mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Pretty basic fix #3490
This commit is contained in:
@@ -102,7 +102,7 @@ class Search implements SearchInterface
|
||||
{
|
||||
$string = implode(' ', $this->words);
|
||||
if ('' === $string) {
|
||||
return \is_string($this->originalQuery) ? $this->originalQuery : '';
|
||||
return is_string($this->originalQuery) ? $this->originalQuery : '';
|
||||
}
|
||||
|
||||
return $string;
|
||||
@@ -132,6 +132,11 @@ class Search implements SearchInterface
|
||||
$filteredQuery = str_replace($match, '', $filteredQuery);
|
||||
}
|
||||
$filteredQuery = trim(str_replace(['"', "'"], '', $filteredQuery));
|
||||
|
||||
// str replace some stuff:
|
||||
$search = ['%', '=', '/', '<', '>', '(', ')', ';'];
|
||||
$filteredQuery = str_replace($search, ' ', $filteredQuery);
|
||||
|
||||
if ('' !== $filteredQuery) {
|
||||
$this->words = array_map('trim', explode(' ', $filteredQuery));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user