diff --git a/module/VuFind/src/VuFind/Search/Base/Params.php b/module/VuFind/src/VuFind/Search/Base/Params.php index 0718b20f5336294282a37b0d319a4aabd0bf2643..03a3f5dc72cdd58277d5b6b0021a06af5e473046 100644 --- a/module/VuFind/src/VuFind/Search/Base/Params.php +++ b/module/VuFind/src/VuFind/Search/Base/Params.php @@ -917,9 +917,9 @@ class Params implements ServiceLocatorAwareInterface $rebuildArray = false; // Loop through all filters on the field - for ($i = 0; $i < count($this->filterList[$field]); $i++) { + foreach ($this->filterList[$field] as $i => $currentFilter) { // Does it contain the value we don't want? - if ($this->filterList[$field][$i] == $value) { + if ($currentFilter == $value) { // If so remove it. unset($this->filterList[$field][$i]);