浏览代码

Used strict comparision.

Jakub Zalas 13 年之前
父节点
当前提交
dcdb761e17
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Composer/Json/JsonFile.php

+ 1 - 1
src/Composer/Json/JsonFile.php

@@ -130,7 +130,7 @@ class JsonFile
             $char = substr($json, $i, 1);
             $char = substr($json, $i, 1);
 
 
             // Are we inside a quoted string?
             // Are we inside a quoted string?
-            if ('"' === $char && ('\\' !== $prevChar || '\\\\' == substr($json, $i-2, 2))) {
+            if ('"' === $char && ('\\' !== $prevChar || '\\\\' === substr($json, $i-2, 2))) {
                 $outOfQuotes = !$outOfQuotes;
                 $outOfQuotes = !$outOfQuotes;
             } elseif (':' === $char && $outOfQuotes) {
             } elseif (':' === $char && $outOfQuotes) {
                 // Add a space after the : character
                 // Add a space after the : character