Browse Source

Used strict comparision.

Jakub Zalas 13 năm trước cách đây
mục cha
commit
dcdb761e17
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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);
 
             // Are we inside a quoted string?
-            if ('"' === $char && ('\\' !== $prevChar || '\\\\' == substr($json, $i-2, 2))) {
+            if ('"' === $char && ('\\' !== $prevChar || '\\\\' === substr($json, $i-2, 2))) {
                 $outOfQuotes = !$outOfQuotes;
             } elseif (':' === $char && $outOfQuotes) {
                 // Add a space after the : character