From b533c1b3ba8a5c6a2140094e3d4d9aec4b12663d Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 9 May 2013 12:18:26 -0400 Subject: [PATCH] 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 --- lib/Cake/Utility/Hash.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Utility/Hash.php b/lib/Cake/Utility/Hash.php index 8a4e57b3a54..39a673669c9 100644 --- a/lib/Cake/Utility/Hash.php +++ b/lib/Cake/Utility/Hash.php @@ -170,7 +170,7 @@ protected static function _matchToken($key, $token) { */ protected static function _matches(array $data, $selector) { preg_match_all( - '/(\[ (?[^=>[><]) \s* (?(?:\/.*?\/ | [^\]]+)) )? \])/x', + '/(\[ (?P[^=>[><]) \s* (?P(?:\/.*?\/ | [^\]]+)) )? \])/x', $selector, $conditions, PREG_SET_ORDER