returning the correct query in beforeFind in case callbacks return true

This commit is contained in:
Jose Lorenzo Rodriguez 2011-12-26 13:38:04 -04:30
parent 1651257919
commit 33705f24bf

View file

@ -2614,7 +2614,7 @@ class Model extends Object implements CakeEventListener {
if ($event->isStopped()) {
return null;
}
$query = $event->data[0];
$query = $event->result === true ? $event->data[0] : $event->result;
}
return $query;