Keyword

Warning: count(): Parameter... com_k2\views\item\tmpl\default.php on line 746

  • K Arockia Chinnappa Raj
  • K Arockia Chinnappa Raj's Avatar Topic Author
  • Offline
  • New Member
More
2 months 3 weeks ago #171298 by K Arockia Chinnappa Raj
K Arockia Chinnappa Raj created the topic: Warning: count(): Parameter... com_k2\views\item\tmpl\default.php on line 746
Basically, I am not a programmer.
I got the error and

I replaced
if (count($this->row->attachments)):

with the below code
if ($this->row->attachments && count($this->row->attachments)):

Error went off.

Is this correct solution?

Thanks.

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 months 3 weeks ago - 2 months 3 weeks ago #171305 by Fotis
Fotis replied the topic: Warning: count(): Parameter... com_k2\views\item\tmpl\default.php on line 746
The file you meant (for others who read this) is actually: /administrator/components/com_k2/views/item/tmpl/default.php

Your change is just fine and I have also fixed this in K2's GitHub repo (here: github.com/getk2/k2/commit/98b76635b4ee5fd27f8c2d1e79ead7261d514f80 ) for the next release.


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member
Last edit: 2 months 3 weeks ago by Fotis.

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

Moderators: william white

Powered by Kunena Forum