Applying patch from 'phally' to update Set::extract to properly tokenize xpath selectors which contain hyphens (-). Fixes #6140

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8059 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
jperras 2009-02-25 16:23:13 +00:00
parent 5ded592c1e
commit f20ccc745c
2 changed files with 39 additions and 1 deletions

View file

@ -388,7 +388,7 @@ class Set extends Object {
if (!isset($contexts[0])) {
$contexts = array($data);
}
$tokens = array_slice(preg_split('/(?<!=)\/(?![a-z]*\])/', $path), 1);
$tokens = array_slice(preg_split('/(?<!=)\/(?![a-z-]*\])/', $path), 1);
do {
$token = array_shift($tokens);