From 88719e5b3d92bdcbf34c1ff9d6bb1100e20c752f Mon Sep 17 00:00:00 2001 From: Pontus Horn Date: Sat, 3 Aug 2019 18:46:59 +0200 Subject: [PATCH] Avoid warning on missing `low_value_words` config --- 40-PicoSearch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/40-PicoSearch.php b/40-PicoSearch.php index f1757d0..e53a53f 100644 --- a/40-PicoSearch.php +++ b/40-PicoSearch.php @@ -169,7 +169,7 @@ class PicoSearch extends AbstractPicoPlugin } public function isLowValueWord($word) { - return in_array(mb_strtolower($searchTerm), $this->getPluginConfig('low_value_words')); + return in_array(mb_strtolower($searchTerm), $this->getPluginConfig('low_value_words') ?: []); } public function onPageRendering(&$twig, &$twigVariables, &$templateName) {