mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-04 02:22:39 +00:00
moving checks for Set::extract() so that null will be returned when empty data is passed and classicExtract is expected.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8105 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
93bf4fd0dc
commit
056402efa7
2 changed files with 8 additions and 6 deletions
|
@ -374,12 +374,12 @@ class Set extends Object {
|
|||
$data = $path;
|
||||
$path = $tmp;
|
||||
}
|
||||
if (empty($data)) {
|
||||
return array();
|
||||
}
|
||||
if (strpos($path, '/') === false) {
|
||||
return Set::classicExtract($data, $path);
|
||||
}
|
||||
if (empty($data)) {
|
||||
return array();
|
||||
}
|
||||
if ($path === '/') {
|
||||
return $data;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue