- Posts: 2
COMMUNITY FORUM
Parameter must be an array
- Adam
- Offline
- New Member
Less
More
6 years 1 month 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.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6218
6 years 1 month ago #169586
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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.
- Boyan Dimov
- Offline
- New Member
Less
More
- Posts: 9
6 years 1 month ago #169594
by Boyan Dimov
Also worked.
Thank you for the support :)
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.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6218
6 years 1 month ago #169595
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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.
- Uzi
- Offline
- Premium Member
Less
More
- Posts: 140
6 years 1 month 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.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6218
6 years 1 month ago #169651
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6218
6 years 1 month ago #169652
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on topic Parameter must be an array
Fixed in v2.9.1 dev: github.com/getk2/k2/archive/master.zip
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Ralf
- Offline
- New Member
Less
More
- Posts: 17
6 years 1 month ago #169673
by Ralf
Replied by Ralf on topic Parameter must be an array
Hi Fotis,
got the same Warning in two other lines:
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.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6218
6 years 1 month ago #169690
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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.
- burnyourears
- Offline
- Senior Member
Less
More
- Posts: 66
5 years 11 months ago - 5 years 11 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:
Line 338 is:
Any idea? :-)
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 11 months ago by burnyourears.
Please Log in or Create an account to join the conversation.