Quellcode durchsuchen

merged branch kriswallsmith/kernel/unnecessary-regex (PR #3104)

Commits
-------

7f7f82a [HttpKernel] removed unnecessary regex

Discussion
----------

[HttpKernel] removed unnecessary regex

The pattern was also flawed because of the unescaped `.`

```
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
```
Fabien Potencier vor 13 Jahren
Ursprung
Commit
fb3513a50e
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      src/Symfony/Component/HttpKernel/HttpCache/Esi.php

+ 1 - 1
src/Symfony/Component/HttpKernel/HttpCache/Esi.php

@@ -64,7 +64,7 @@ class Esi
             return false;
         }
 
-        return (Boolean) preg_match('#ESI/1.0#', $value);
+        return false !== strpos($value, 'ESI/1.0');
     }
 
     /**