pkp-lib
pkp-lib copied to clipboard
PHP Warnings for searches that yield no results
Describe the bug We obtain several 100 PHP Warnings for searches that yield no results daily:
PHP Warning: foreach() argument must be of type array|object, null given in {ojs_root}/classes/search/ArticleSearch.php on line 265
While cosmetic, this affects public function formatResults($results, $user = null) . Actually, if there are no results, this function shouldn't be called at all or at least be quit immediately.
To Reproduce Carry out a search that yields no result and watch the PHP error log.
What application are you using? OJS 3.4.0-5