Skip to content

Commit

Permalink
Fix test by checking against an empty array instead of false
Browse files Browse the repository at this point in the history
  • Loading branch information
rchavik committed Dec 27, 2013
1 parent c48afae commit c4f8289
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Model/Behavior/TreeBehavior.php
Expand Up @@ -212,7 +212,7 @@ public function beforeSave(Model $Model, $options = array()) {
'fields' => array($Model->primaryKey, $parent, $left, $right), 'recursive' => $recursive)
);

if ($values === false) {
if (empty($values)) {
return false;
}
list($node) = array_values($values);
Expand Down

0 comments on commit c4f8289

Please sign in to comment.