From e1cb95cd2fb23e2cee1d33a25752089acf8058cd Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Thu, 28 Feb 2013 10:32:34 -0500 Subject: [PATCH] Make findSearchTerm() regexes Unicode-friendly. --- 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 1305d40d4eb..41f82afff90 100644 --- a/module/VuFind/src/VuFind/Search/Base/Params.php +++ b/module/VuFind/src/VuFind/Search/Base/Params.php @@ -1293,7 +1293,7 @@ class Params implements ServiceLocatorAwareInterface if (isset($this->searchTerms[0]['group'])) { foreach ($this->searchTerms as $group) { foreach ($group['group'] as $search) { - if (preg_match("/\b$needle\b/", $search['lookfor'])) { + if (preg_match("/\b$needle\b/u", $search['lookfor'])) { return true; } } @@ -1301,7 +1301,7 @@ class Params implements ServiceLocatorAwareInterface } else { // Basic search foreach ($this->searchTerms as $haystack) { - if (preg_match("/\b$needle\b/", $haystack['lookfor'])) { + if (preg_match("/\b$needle\b/u", $haystack['lookfor'])) { return true; } } -- GitLab