I just upgraded my PHP Version from 5.6 to 7.4. I used count() function in my page, example:
$watch_server_count = count($watch_server);
if ($watch_server_count > 0) {
foreach ($watch_server->table as $key=> $watch_server_rows) {
}
}
Warning: count(): Parameter must be an array or an object that implements Countable in...
$watch_server
contains.$watch_server
is an object, not an array, hence the$watch_server->...
. Did you mean$watch_server_count = count($watch_server->table);
? This would make sense since you are iterating this property