e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
318 stars 212 forks source link

[Bug]: PHP 8.2. search and php method - Fatal error: Uncaught TypeError: count(): #5211

Closed Jimmi08 closed 3 months ago

Jimmi08 commented 3 months ago

What e107 version are you using?

v2.3.3

Bug description

If select Search sort method: PHP LIMITED TO in search preferences, there is fatal error in PHP 8.2 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in ***\e107_handlers\search_class.php on line 236

How to reproduce

  1. go to search preferences
  2. select image
  3. try to search something

Expected behavior

No fatal error

What browser(s) are you seeing the problem on?

Chrome / Brave

PHP Version

PHP 8.2