Skip to content

Commit

Permalink
returning the correct query in beforeFind in case callbacks return true
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Dec 26, 2011
1 parent 1651257 commit 33705f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Model/Model.php
Expand Up @@ -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;
Expand Down

0 comments on commit 33705f2

Please sign in to comment.