error installing package and key warning: count(): parameter must be an array or an object that implements countable in #294

Closed
opened 2018-05-28 10:49:15 +00:00 by josephballester · 9 comments
josephballester commented 2018-05-28 10:49:15 +00:00 (Migrated from github.com)

I follow the steps explained on video "How to install JCB"

When i select Joomla Component Public i set the values
FORCE LOCAL UDATE TO YES
ALL WARNING TO YES
MERGE TO YES

KEY : "i enter the key i received by email"

PRESS THE CONTINUE BUTTON.

Second laters of pressing the button a receive a list of the same warning for differect code lines ..

warning: count(): parameter must be an array or an object that implements countable in line ####

Joomla Component BUilder versino is 2.7.10 and the package im trying to download is 2.7.9.

I follow the steps explained on video "How to install JCB" When i select Joomla Component Public i set the values FORCE LOCAL UDATE TO YES ALL WARNING TO YES MERGE TO YES KEY : "i enter the key i received by email" PRESS THE CONTINUE BUTTON. Second laters of pressing the button a receive a list of the same warning for differect code lines .. warning: count(): parameter must be an array or an object that implements countable in line #### Joomla Component BUilder versino is 2.7.10 and the package im trying to download is 2.7.9.

What is the line number of the error and the file name?

Also what is the:

System information (as much as possible)

  • OS Name & Version:
  • MySql Version:
  • Apache Version:
  • PHP Version:
  • Joomla Version:
  • JCB Version:
  • Browser:
What is the line number of the error and the file name? Also what is the: ### System information (as much as possible) - OS Name & Version: - MySql Version: - Apache Version: - PHP Version: - Joomla Version: - JCB Version: - Browser:
josephballester commented 2018-05-28 14:59:41 +00:00 (Migrated from github.com)

Sorry for late response

Line number is
Warning: count(): Parameter must be an array or an object that implements
Countable in
C:\xampp\htdocs\jm\administrator\components\com_componentbuilder\helpers\componentbuilder.php
on line 4586

OS Name
XAMPP for Windows 7.2.3 installed on windows 10

mysql 5.0.12

Apachae 2.4.29

PHp 7.2.3

Joomla 3.8.8

JCB 2.7.10

Browsher: Chrome, Internet Explorer and Firefox

Sorry for late response Line number is *Warning*: count(): Parameter must be an array or an object that implements Countable in *C:\xampp\htdocs\jm\administrator\components\com_componentbuilder\helpers\componentbuilder.php* on line *4586* OS Name XAMPP for Windows 7.2.3 installed on windows 10 mysql 5.0.12 Apachae 2.4.29 PHp 7.2.3 Joomla 3.8.8 JCB 2.7.10 Browsher: Chrome, Internet Explorer and Firefox

As a quick fix add the following to line 4586 in the helper class.

if (count((array)$_result))

This should resolve the error. I will patch it with the next release.

As a quick fix add the following to [line 4586](https://github.com/vdm-io/Joomla-Component-Builder/blob/master/admin/helpers/componentbuilder.php#L4586) in the helper class. ``` if (count((array)$_result)) ``` This should resolve the error. I will patch it with the next release.
josephballester commented 2018-05-28 20:04:24 +00:00 (Migrated from github.com)

thank.

ill try and let you know.

thank. ill try and let you know.
josephballester commented 2018-05-28 20:53:42 +00:00 (Migrated from github.com)

HI.

Sorry i doesnt work. Im attaching the file with this email.

Thanks again

HI. Sorry i doesnt work. Im attaching the file with this email. Thanks again

If you don't give me the next error message I can't debug...

If you don't give me the next error message I can't debug...

My commit to the staging branch closed the issue, but you are still welcome to continue. IF so that the staging branch has not resolved the issue.

My commit to the staging branch closed the issue, but you are still welcome to continue. IF so that the staging branch has not resolved the issue.
josephballester commented 2018-05-29 09:49:43 +00:00 (Migrated from github.com)

Sorry for late response

Error is the same than the previous one:

Line number is
Warning: count(): Parameter must be an array or an object that implements
Countable in
C:\xampp\htdocs\jm\administrator\components\com_componentbuilder\helpers\componentbuilder.php

Sorry for late response Error is the same than the previous one: Line number is *Warning*: count(): Parameter must be an array or an object that implements Countable in *C:\xampp\htdocs\jm\administrator\components\com_componentbuilder\helpers\componentbuilder.php*

On line 4586 in the helper class replace:

if (count($_result))

with:

if (count((array)$_result))

This should resolve the error. This has already been patched in the staging branch.

On [line 4586](https://github.com/vdm-io/Joomla-Component-Builder/blob/master/admin/helpers/componentbuilder.php#L4586) in the helper class replace: ``` if (count($_result)) ``` with: ``` if (count((array)$_result)) ``` This should resolve the error. This has already been patched in the staging branch.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#294
No description provided.