Partial fix for #5225

Corrected expected behavior for 2nd issue

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7633 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
the_undefined 2008-09-19 18:08:27 +00:00
parent 931d996d90
commit 740bd4e769
2 changed files with 6 additions and 15 deletions

View file

@ -397,6 +397,9 @@ class Set extends Object {
$context = array('trace' => array(), 'item' => $context, 'key' => null);
}
if ($token === '..') {
if (count($context['trace']) == 1) {
$context['trace'][] = $context['key'];
}
$parent = join('/', $context['trace']).'['.($key+1).']';
$context['item'] = Set::extract($parent, $data);
$context['key'] = array_pop($context['trace']);