Keyword

Parameter must be an array

More
2 months 1 week ago #169585 by Adam
Adam replied the topic: Parameter must be an array
It worked, thank you!

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 months 1 week ago #169586 by Fotis
Fotis replied the topic: Parameter must be an array
Great!


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

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

More
2 months 1 week ago #169594 by Boyan Dimov
Boyan Dimov replied the topic: Parameter must be an array

Fotis wrote: Update it to this:

<?php if($params->get('itemExtraFields') && isset($this->item->extra_fields) && count($this->item->extra_fields)): ?>


Also worked.
Thank you for the support :)

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 months 1 week ago #169595 by Fotis
Fotis replied the topic: Parameter must be an array
Boyan, I recommend you install K2 2.9.1 dev from github.com/getk2/k2/archive/master.zip as this and other parts of the code in the templates is now fixed.


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

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

More
2 months 6 days ago #169618 by Uzi
Uzi replied the topic: Parameter must be an array
I still have this issue in the mod_k2_content on line 62. There is still a count function.

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 months 4 days ago #169651 by Fotis
Fotis replied the topic: Parameter must be an array
We'll fix it on the coming update. In the meantime, you can simply hide warnings/notices.


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

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 months 4 days ago #169652 by Fotis
Fotis replied the topic: Parameter must be an array


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

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

More
2 months 4 days ago #169673 by Ralf
Ralf replied the topic: Parameter must be an array
Hi Fotis,
got the same Warning in two other lines:
PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /www/htdocs/administrator/components/com_k2/models/item.php on line 412

PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /www/htdocs/administrator/components/com_k2/models/item.php on line 687

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 months 3 days ago #169690 by Fotis
Fotis replied the topic: Parameter must be an array
Noted.


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

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

More
4 days 9 hours ago - 4 days 9 hours ago #170570 by burnyourears
burnyourears replied the topic: Parameter must be an array
I get this error on opening a new article:

Warning: sizeof(): Parameter must be an array or an object that implements Countable in administrator/components/com_k2/views/item/view.html.php on line 338

It addresses the extra field section of the view.html.php:

// Extra fields
        $extraFieldModel = K2Model::getInstance('ExtraField', 'K2Model');
        if ($category->id) {
            $extraFields = $extraFieldModel->getExtraFieldsByGroup($category->extraFieldsGroup);
        } else {
            $extraFields = null;
        }

        for ($i = 0; $i < sizeof($extraFields); $i++) {
            $extraFields[$i]->element = $extraFieldModel->renderExtraField($extraFields[$i], $item->id);
        }

Line 338 is:
for ($i = 0; $i < sizeof($extraFields); $i++) {

Any idea? :-)
Last Edit: 4 days 9 hours ago by burnyourears.

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

Moderators: william white