From 660a65437057d293f4df21d3c865ab4d0e7fc1e9 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Wed, 13 Nov 2019 15:56:02 -0500 Subject: [PATCH] Greater fault tolerance. --- module/VuFind/src/VuFind/Search/Base/Params.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/VuFind/src/VuFind/Search/Base/Params.php b/module/VuFind/src/VuFind/Search/Base/Params.php index 502f88d6b84..b1461ff607d 100644 --- a/module/VuFind/src/VuFind/Search/Base/Params.php +++ b/module/VuFind/src/VuFind/Search/Base/Params.php @@ -1800,12 +1800,12 @@ class Params $retVal = false; // If the section is in reverse order, the tilde will flag this: if (substr($facetList, 0, 1) == '~') { - foreach ($config->{substr($facetList, 1)} as $value => $key) { + foreach ($config->{substr($facetList, 1)} ?? [] as $value => $key) { $this->addCheckboxFacet($key, $value); $retVal = true; } } else { - foreach ($config->$facetList as $key => $value) { + foreach ($config->$facetList ?? [] as $key => $value) { $this->addCheckboxFacet($key, $value); $retVal = true; } -- GitLab