Keyword

Warning: Parameter must be an array or an object that implements

  • Link111
  • Link111's Avatar Topic Author
  • Offline
  • New Member
More
4 years 11 months ago - 4 years 11 months ago #173818 by Link111
Hello,

when I change PHP version to 7.3 (or 7.2) I get this warning on my website: Warning: count(): Parameter must be an array or an object that implements Countable in /home/user/public_html/templates/rt_salient/html/com_k2/templates/default/category.php on line 192
I have the newest K2 update v2.10.1. Also, setting error reporting in Joomla to none doesn't help, the warning still appears.
When I switch back to PHP 7.1 version, the warning is gone, however, on december 1st, 7.1 version will no longer be supported and recieve security updates, thus change of version is needed.
Last edit: 4 years 11 months ago by Link111.

Please Log in or Create an account to join the conversation.

More
4 years 11 months ago #173819 by JoomlaWorks
You need to update your K2 template overrides to be compatible with PHP 7.3. Compare your overrides' "count()" references with K2's source template files to see how to update those if/else statements to be compatible with PHP 7.3's stricter requirements.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum