Laravel ErrorException in Builder.php line 1194: count(): Parameter must be an array or an object that implements Countable or ErrorException in Builder.php line 1185: count(): Parameter must be an array or an object that implements Countable #4
Fixed by:
Adding to \app\Http\Controllers\Controller.php
public function __construct(){
if (version_compare(PHP_VERSION, '7.2.0', '>=')) {
// Ignores notices and reports all other kinds... and warnings
// error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);
error_reporting(E_ALL ^ E_WARNING); // Maybe this is enough
}
}
Fixed by: Adding to \app\Http\Controllers\Controller.php
public function __construct(){ if (version_compare(PHP_VERSION, '7.2.0', '>=')) { // Ignores notices and reports all other kinds... and warnings // error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING); error_reporting(E_ALL ^ E_WARNING); // Maybe this is enough } }