Fix test by checking against an empty array instead of false

This commit is contained in:
Rachman Chavik 2013-12-27 12:37:39 +07:00
parent c48afae2dc
commit c4f8289b53

View file

@ -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);