Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
b62d0618
Unverified
Commit
b62d0618
authored
Oct 02, 2020
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#3173873
by shetpooja04: Unused variable $pos in SearchQuery.php, search module
(cherry picked from commit
e0c3bb56
)
parent
3ea2ca57
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
core/modules/search/src/SearchQuery.php
core/modules/search/src/SearchQuery.php
+1
-1
No files found.
core/modules/search/src/SearchQuery.php
View file @
b62d0618
...
...
@@ -520,7 +520,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
++
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment