mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-03 18:12:40 +00:00
casting the find as an array to avoid errors with array_values() fixes #1041 and 4 failing tests (3 previous)
Signed-off-by: mark_story <mark@mark-story.com>
This commit is contained in:
parent
465c24f903
commit
95168cee6e
2 changed files with 3 additions and 1 deletions
|
@ -284,7 +284,7 @@ class TreeBehavior extends ModelBehavior {
|
|||
if (!$id) {
|
||||
$conditions = $scope;
|
||||
} else {
|
||||
$result = array_values($Model->find('first', array(
|
||||
$result = array_values((array)$Model->find('first', array(
|
||||
'conditions' => array($scope, $Model->escapeField() => $id),
|
||||
'fields' => array($left, $right),
|
||||
'recursive' => $recursive
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue