[IP.Board 3.1.3 / PHP 7.2] «count(): Parameter must be an array or an object that implements Countable in admin/sources/classes/search/controller.php on line 558»

php72
ip-board
php

(Dmitry Fedyuk) #1

PHP Warning: count(): Parameter must be an array or an object that implements Countable inadmin/sources/classes/search/controller.php on line 558


(Dmitry Fedyuk) #2

How to fix

Locate the line in the admin/sources/classes/search/controller.php file:

if ( count( $this->_results ) )

Replace it with:

if ($this->_results && count($this->_results))