瀏覽代碼

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 13 年之前
父節點
當前提交
fb3513a50e
共有 1 個文件被更改,包括 1 次插入1 次删除
  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');
     }
 
     /**