mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Making ModelBehavior::beforeFind() return true by default. Since
returning null causes the find to abort, behaviors should return true if they are not going to return a query array.
This commit is contained in:
parent
dc7ff8911d
commit
f3445cd941
1 changed files with 5 additions and 2 deletions
|
@ -80,10 +80,13 @@ class ModelBehavior extends Object {
|
|||
*
|
||||
* @param object $model Model using this behavior
|
||||
* @param array $queryData Data used to execute this query, i.e. conditions, order, etc.
|
||||
* @return mixed False or null will abort the operation. You should array will replace the value of $query.
|
||||
* @return mixed False or null will abort the operation. You can return an array to replace the
|
||||
* $query that will be eventually run.
|
||||
* @access public
|
||||
*/
|
||||
public function beforeFind($model, $query) { }
|
||||
public function beforeFind($model, $query) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* After find callback. Can be used to modify any results returned by find and findAll.
|
||||
|
|
Loading…
Reference in a new issue