pkp-lib icon indicating copy to clipboard operation
pkp-lib copied to clipboard

PHP Warnings for searches that yield no results

Open mpbraendle opened this issue 5 months ago • 0 comments

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

mpbraendle avatar Sep 04 '24 14:09 mpbraendle