Keyword

Parameter must be an array

More
5 years 6 months ago #169585 by Adam
Replied by Adam on topic Parameter must be an array
It worked, thank you!

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

More
5 years 6 months ago #169586 by JoomlaWorks
Replied by JoomlaWorks on topic Parameter must be an array
Great!

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 6 months ago #169594 by Boyan Dimov
Replied by Boyan Dimov on 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.

More
5 years 6 months ago #169595 by JoomlaWorks
Replied by JoomlaWorks on 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.

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 6 months ago #169618 by Uzi
Replied by Uzi on 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.

More
5 years 6 months ago #169651 by JoomlaWorks
Replied by JoomlaWorks on topic Parameter must be an array
We'll fix it on the coming update. In the meantime, you can simply hide warnings/notices.

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 6 months ago #169652 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.

More
5 years 6 months ago #169673 by Ralf
Replied by Ralf on 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.

More
5 years 6 months ago #169690 by JoomlaWorks
Replied by JoomlaWorks on topic Parameter must be an array
Noted.

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 4 months ago - 5 years 4 months ago #170570 by burnyourears
Replied by burnyourears on 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: 5 years 4 months ago by burnyourears.

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


Powered by Kunena Forum