PHP Error in WordPress PlugIn

Hi there,

i work on an wordpress site and after the chang to PHP 7.3 on our hosters server we hav an error called

Warning : count(): Parameter must be an array or an object that implements Countable in /wp-content/plugins/progress-map-list-and-filter/progress-map-list.php on line 2997

The variable/Array is declared as follows:

$cspml_custom_fields = (array) json_decode($this->cspml_get_setting(‘list_filter’, ‘custom_fields’, ‘’));

and the line with the error is:

if(count($this->cspml_custom_fields) > 0){

As i am not fit in the usage of PHP you maybe can give me some help on this problem.

Greets and thanks in advance from germany,

Andreas

It’s a bandaid, but

if(is_array($this->cspml_custom_fields))
    if(count($this->cspml_custom_fields) > 0){

Whow … thanks a lot … that solved the problems :slight_smile: Many many thanks :slight_smile:

Sponsor our Newsletter | Privacy Policy | Terms of Service