suffusion icon indicating copy to clipboard operation
suffusion copied to clipboard

Fix PHP warning when counting tags

Open marcissimus opened this issue 1 year ago • 2 comments

Fix the following warning:

PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/........./public_html/wp-content/themes/suffusion/widgets/suffusion-query-posts.php on line 113

Closes #90

marcissimus avatar Sep 21 '24 20:09 marcissimus

Hi Marc,

Thank for looking into this.

With this code I got: PHP Parse error: syntax error, unexpected ':', expecting ')' in /home/......./public_html/wp-content/themes/suffusion/widgets/suffusion-query-posts.php on line 114

The site is using the latest WordPress on PHP 8.3.

Thank you, Ciprian (Drake)

Ciprian-Dracea avatar Sep 22 '24 19:09 Ciprian-Dracea

It looks like you tested the code of the first commit which had the error: https://github.com/sayontan/suffusion/pull/91/commits/311cabc8ce5de399f862d56828dcf64465c3bda3

It should add only one line at line 113 but not change the if:

https://github.com/sayontan/suffusion/pull/91/files

mbtools avatar Sep 22 '24 20:09 mbtools