From c4f8289b539143b3d112596eb26a8ac6f0086324 Mon Sep 17 00:00:00 2001 From: Rachman Chavik Date: Fri, 27 Dec 2013 12:37:39 +0700 Subject: [PATCH] Fix test by checking against an empty array instead of `false` --- lib/Cake/Model/Behavior/TreeBehavior.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Model/Behavior/TreeBehavior.php b/lib/Cake/Model/Behavior/TreeBehavior.php index 9c09e0f91..ce64d6c0c 100644 --- a/lib/Cake/Model/Behavior/TreeBehavior.php +++ b/lib/Cake/Model/Behavior/TreeBehavior.php @@ -212,7 +212,7 @@ class TreeBehavior extends ModelBehavior { 'fields' => array($Model->primaryKey, $parent, $left, $right), 'recursive' => $recursive) ); - if ($values === false) { + if (empty($values)) { return false; } list($node) = array_values($values);