Skip to content

Commit

Permalink
Merge pull request #579 from FriendsOfCake/issue-578
Browse files Browse the repository at this point in the history
Fix compatibility with older version of search plugin.
  • Loading branch information
ADmad authored Feb 25, 2018
2 parents 2b9ae1a + 62b4e65 commit dbee73d
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 dbee73d

Please sign in to comment.