mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-03 01:52:40 +00:00
Make sure invalid arrays return empty array instead of throwing notices.
This commit is contained in:
parent
ef96724bc8
commit
143e8e4c56
2 changed files with 21 additions and 0 deletions
|
@ -1037,6 +1037,8 @@ class Hash {
|
|||
|
||||
if ($options['root']) {
|
||||
$root = $options['root'];
|
||||
} elseif (!$return) {
|
||||
return array();
|
||||
} else {
|
||||
$root = self::get($return[0], $parentKeys);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue