From e0c3bb56f63c1a32dc90035f7bae8c83b141cefb Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Fri, 2 Oct 2020 13:03:18 +0100 Subject: [PATCH] Issue #3173873 by shetpooja04: Unused variable $pos in SearchQuery.php, search module --- core/modules/search/src/SearchQuery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/search/src/SearchQuery.php b/core/modules/search/src/SearchQuery.php index 08291e629668..ad451e81456c 100644 --- a/core/modules/search/src/SearchQuery.php +++ b/core/modules/search/src/SearchQuery.php @@ -521,7 +521,7 @@ public function addScore($score, $arguments = [], $multiply = FALSE) { // search expression. So, use string replacement to change this to a // calculated query expression, counting the number of occurrences so // in the execute() method we can add arguments. - while (($pos = strpos($score, 'i.relevance')) !== FALSE) { + while (strpos($score, 'i.relevance') !== FALSE) { $pieces = explode('i.relevance', $score, 2); $score = implode('((ROUND(:normalization_' . $this->relevance_count . ', 4)) * i.score * t.count)', $pieces); $this->relevance_count++; -- GitLab