Keyword

Parameter must be an array

More
5 years 9 months ago #171200 by JoomlaWorks
Replied by JoomlaWorks on topic Parameter must be an array
This is your template's override that conflicts with PHP 7.x, not K2. Simply upgrade your overrides like the K2 source template files.

github.com/getk2/k2/blob/master/components/com_k2/templates/default/item.php

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

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

More
5 years 2 months ago #173071 by trogladyte
Replied by trogladyte on topic Parameter must be an array
I just upgraded my server from PHP7.1.31 to PHP7.3.x yesterday as I was getting EOL warnings from Joomla. Since that, I can confirm that this K2 warning has now appeared,

Warning: count(): Parameter must be an array or an object that implements Countable in /home/tastewas/public_html/components/com_k2/models/item.php on line 763

While I understand that it's only a warning and only appears if the error reporting in Joomla is set to anything other than none or Sys Def, and it doesn't affect site operation, does this not mean that the K2 code isn't completely in line with current PHP versions?

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

More
5 years 2 months ago #173072 by JoomlaWorks
Replied by JoomlaWorks on topic Parameter must be an array
Please upgrade to K2 v2.10.0 (dev) from github.com/getk2/k2/archive/master.zip - these warnings are resolved there.

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

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

More
4 years 10 months ago #174252 by Blutch
Replied by Blutch on topic Parameter must be an array
Hello,
I just had an error preventing my site from working in frontend. The error is :

[02-Jan-2020 11:18:29 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in [...]/templates/sandal/html/com_k2/templates/default/item.php on line 187
[02-Jan-2020 11:18:33 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in [...]/templates/sandal/html/com_k2/templates/default/category.php on line 137

I can't figure out how to fix this problem when everything is working properly backend. Could you help me ?

PHP Version 7.2.26
Web Server Apache
WebServer to PHP Interface litespeed
Joomla! 3.9.14 Stable [ Amani ] 17-December-2019 15:00 GMT
Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT

thanks a lot !

Blutch

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

More
4 years 10 months ago #174253 by JoomlaWorks
Replied by JoomlaWorks on topic Parameter must be an array

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