From 0dee11e669feb2c55e053f3261a5eba423595544 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Tue, 5 Feb 2019 15:46:41 -0500 Subject: [PATCH] Improve PHP 7.3 compatibility (#1315) - Add PHP 7.3 to Travis configuration. - Use more explicit typing in SpellingProcessor to avoid PHP 7.3 notice. --- .travis.yml | 1 + module/VuFind/src/VuFind/Search/Solr/SpellingProcessor.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d990cf83447..37bf1b94e6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ php: - 7.0 - 7.1 - 7.2 + - 7.3 env: - VUFIND_HOME=$PWD VUFIND_LOCAL_DIR=$PWD/local diff --git a/module/VuFind/src/VuFind/Search/Solr/SpellingProcessor.php b/module/VuFind/src/VuFind/Search/Solr/SpellingProcessor.php index 03720d3fbc7..357f1fce804 100644 --- a/module/VuFind/src/VuFind/Search/Solr/SpellingProcessor.php +++ b/module/VuFind/src/VuFind/Search/Solr/SpellingProcessor.php @@ -252,7 +252,7 @@ class SpellingProcessor foreach ($this->tokenize($query) as $token) { // TODO - Do we need stricter matching here, similar to that in // \VuFindSearch\Query\Query::replaceTerm()? - if (stripos($token, $term) !== false) { + if (stripos($token, (string)$term) !== false) { $inToken = true; // We need to replace the whole token $targetTerm = $token; -- GitLab