Parameter must be an array or an object that implements Countable
-
While using the Phoenix Media Rename plugin to rename files, I get this warning in the log repeated in copious amount per minute:
PHP Warning: count(): Parameter must be an array or an object that implements Countable in D:\domains\www.evitaworks.com\wp-content\plugins\wp-analytify\lib\Google\Collection.php on line 51
After tweaking the impeding code as below the issue seems to go away:
public function count() { #alx359--> #https://stackoverflow.com/questions/51109440 if( is_array ($this->modelData[$this->collection_key]) || is_object($this->modelData[$this->collection_key]) ) #<--alx359 return count($this->modelData[$this->collection_key]); }
Thanks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Parameter must be an array or an object that implements Countable’ is closed to new replies.