Sfoglia il codice sorgente

[Yaml] made a small optimization

Fabien Potencier 13 anni fa
parent
commit
12a852e18b
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/Symfony/Component/Yaml/Parser.php

+ 1 - 1
src/Symfony/Component/Yaml/Parser.php

@@ -66,7 +66,7 @@ class Parser
             }
 
             // tab?
-            if (preg_match('#^\t+#', $this->currentLine)) {
+            if ("\t" === $this->currentLine[0]) {
                 throw new ParseException('A YAML file cannot contain tabs as indentation.', $this->getRealCurrentLineNb() + 1, $this->currentLine);
             }