Add to Menu

Warning: count(): Parameter must be an array or an object that implements Countable

2 years 1 month ago #84643

Nicholas Yang's Avatar Nicholas Yang

Possibly related to updates in PHP. I have Global Configuration > Server > Server Settings set to "Development".

On the Users > Manage page, at the bottom I see:

Warning: count(): Parameter must be an array or an object that implements Countable in /.../administrator/modules/mod_addtomenu/helper.php on line 124

My PHP Version: 7.2.10

2 years 1 month ago #84647

Peter van Westen's Avatar Peter van Westen Admin

I cannot reproduce the issue.
The count is done on the value of a radio field type, which should be of the type array.
So if that is not the case, something else seems to be wrong that is causing this...

Can you give me (super) admin and (s)ftp access so I can take a look?
And tell me on what url I can see/reproduce the issue.
You can use the 'Hidden text' button in the forum editor to hide the confidential information.

2 years 1 month ago #84651

Nicholas Yang's Avatar Nicholas Yang

Sure thing. I setup a new install to make sure nothing else in my setup was affecting it. PHP 7.1 vs 7.2 does seem to make a difference.

Confidential information:
(hidden)

2 years 1 month ago #84653

Peter van Westen's Avatar Peter van Westen Admin

Please try the latest development version from:
www.regularlabs.com/development-releases

2 years 1 month ago #84654

Nicholas Yang's Avatar Nicholas Yang

Looks good, thank you!