Browse files

returning the correct query in beforeFind in case callbacks return true

  • Loading branch information...
1 parent 1651257 commit 33705f24bf2c9bf7c52ec56c029117d0fb061e0f @lorenzo lorenzo committed Dec 26, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Model/Model.php
View
2 lib/Cake/Model/Model.php
@@ -2614,7 +2614,7 @@ public function buildQuery($type = 'first', $query = array()) {
if ($event->isStopped()) {
return null;
}
- $query = $event->data[0];
+ $query = $event->result === true ? $event->data[0] : $event->result;
}
return $query;

0 comments on commit 33705f2

Please sign in to comment.