Explorar o código

[Yaml] made a small optimization

Fabien Potencier %!s(int64=13) %!d(string=hai) anos
pai
achega
12a852e18b
Modificáronse 1 ficheiros con 1 adicións e 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);
             }