Closed

Description
Preconditions (*)
- Fresh Magento installation with magento 2.3-develop
Steps to reproduce (*)
- Setup vanilla 2.3-develop
- Create a product in the backend, give it the name "test"
- On the frontend, perform a search query, search for "test"
- Notice that it finds the product
- If you now go to the Search Terms page in the frontend, it will show the search term "test" => good
- Now in the backend, go to Marketing > SEO & Search > Search Terms
- Open your "test" term
- Set the "Number of Uses" to 0 and save
- Click On Search terms option present at the bottom
Expected result (*)
- Page opens without any error
- There is no errors in the system log
Actual result (*)
- In developer Magento mode Warning is shown on the Search Terms page
Warning: natcasesort() expects parameter 1 to be array, null given in /var/www/html/deployer/instances/i-25245-2-3-develop/app/code/Magento/Search/Block/Term.php on line 102 [] []
- In default mode error is shown in
system.log
Additional information
Based on comment #25245 (comment)
Fix seems to be very easy:
diff --git a/app/code/Magento/Search/Block/Term.php b/app/code/Magento/Search/Block/Term.php
index b27ef6b01fd..a1eb0bb64c9 100644
--- a/app/code/Magento/Search/Block/Term.php
+++ b/app/code/Magento/Search/Block/Term.php
@@ -87,6 +87,7 @@ class Term extends Template
return $this;
}
+ $termKeys = [];
$this->_maxPopularity = reset($terms)->getPopularity();
$this->_minPopularity = end($terms)->getPopularity();
$range = $this->_maxPopularity - $this->_minPopularity;
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.4-develop branchGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.3 release