From 62b4e65185f59d433a02d24579f15679ce457201 Mon Sep 17 00:00:00 2001 From: ADmad Date: Mon, 26 Feb 2018 00:41:00 +0530 Subject: [PATCH] Fix compatibility with older version of search plugin. Closes #578. --- phpstan.neon | 2 +- src/Listener/SearchListener.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index b075e4e59..2391a09b3 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -10,7 +10,7 @@ parameters: - '#Call to an undefined method Crud\\Action\\BaseAction::view\(\)#' - '#Call to an undefined method Crud\\Action\\BaseAction::viewVar\(\)#' - '#Call to an undefined method Crud\\Action\\BaseAction::findMethod\(\)#' - - '#Call to an undefined method Cake\\ORM\\BehaviorRegistry::filterParams\(\)# ' + - '#Call to an undefined method Cake\\ORM\\Table::filterParams\(\)# ' - '#Call to an undefined method object::getLogs\(\)#' - '#Access to an undefined property object::\$url#' - '#Access to an undefined property object::\$success#' diff --git a/src/Listener/SearchListener.php b/src/Listener/SearchListener.php index cf0153fb7..f230e29f7 100644 --- a/src/Listener/SearchListener.php +++ b/src/Listener/SearchListener.php @@ -56,7 +56,7 @@ public function injectSearch(Event $event) } if ($repository instanceof Table && $repository->behaviors()->hasMethod('filterParams')) { - $filterParams = $repository->behaviors()->filterParams($this->_request()->getQuery()); + $filterParams = $repository->filterParams($this->_request()->getQuery()); } else { $filterParams = ['search' => $this->_request()->getQuery()]; }