Skip to content

Commit

Permalink
Fix compatibility with older version of search plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Feb 25, 2018
1 parent 2b9ae1a commit 62b4e65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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#'
Expand Down
2 changes: 1 addition & 1 deletion src/Listener/SearchListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()];
}
Expand Down

0 comments on commit 62b4e65

Please sign in to comment.