Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make named capture groups compatible with older PCRE versions.
CentOS is terrible and generally contains very old versions of PCRE.
Update patterns to use more backwards compatible named capture groups.

Fixes #3821
  • Loading branch information
markstory committed May 9, 2013
1 parent de5b25e commit b533c1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Hash.php
Expand Up @@ -170,7 +170,7 @@ protected static function _matchToken($key, $token) {
*/
protected static function _matches(array $data, $selector) {
preg_match_all(
'/(\[ (?<attr>[^=><!]+?) (\s* (?<op>[><!]?[=]|[><]) \s* (?<val>(?:\/.*?\/ | [^\]]+)) )? \])/x',
'/(\[ (?P<attr>[^=><!]+?) (\s* (?P<op>[><!]?[=]|[><]) \s* (?P<val>(?:\/.*?\/ | [^\]]+)) )? \])/x',
$selector,
$conditions,
PREG_SET_ORDER
Expand Down

0 comments on commit b533c1b

Please sign in to comment.