Explorar el Código

[Yaml] made a small optimization

Fabien Potencier hace 13 años
padre
commit
12a852e18b
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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);
             }