Welcome to Geeklog, Anonymous Tuesday, February 17 2026 @ 01:26 pm EST
Geeklog Forums
count(): Parameter must be an array or an object that implements Countable
Status: offline
alb3rt
Forum User
Regular Poster
Registered: 10/30/06
Posts: 71
Location:Mexico City
Hello everybody,
I am getting an error to the "My account" section (~/usersettings.php), when trying to save the data it shows me this error:
E_WARNING(2) - count(): Parameter must be an array or an object that implements Countable @ /home/ramos/VirtualHost/beta/public_html/usersettings.php line 1343
1 savepreferences /home/ramos/VirtualHost/beta/public_html/usersettings.php 1577
I'm using: MariaDB 10.1.34 and PHP 7.2.10
Any ideas?
Thanks.
D Web Studio - www.d-webstudio.net
I am getting an error to the "My account" section (~/usersettings.php), when trying to save the data it shows me this error:
Text Formatted Code
E_WARNING(2) - count(): Parameter must be an array or an object that implements Countable @ /home/ramos/VirtualHost/beta/public_html/usersettings.php line 1343
Text Formatted Code
1 savepreferences /home/ramos/VirtualHost/beta/public_html/usersettings.php 1577
I'm using: MariaDB 10.1.34 and PHP 7.2.10
Any ideas?
Thanks.
D Web Studio - www.d-webstudio.net
37
30
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1483
Location:Canada
You didn't saw what version of Geeklog you are using...
I believe this error relates to PHP 7.2 and has been fixed in the upcoming version of Geeklog.
For Geeklog v2.2.0 in usersetting.php around line 1336 replace:
$AIDS = @array_values($A['selauthors']); // array of integers
$BOXES = @array_values($A['blocks']); // array of integers
$ETIDS = @array_values($A['etids']); // array of strings
$AETIDS = USER_getAllowedTopics(); // array of strings (fetched, needed to "clean" $TIDS and $ETIDS)
with this:
if (isset($A['topics']) && is_array($A['topics'])) {
$TIDS = array_values($A['topics']); // array of strings
}
$AIDS = array();
if (isset($A['selauthors']) && is_array($A['selauthors'])) {
$AIDS = array_values($A['selauthors']); // array of integers
}
$BOXES = array();
if (isset($A['blocks']) && is_array($A['blocks'])) {
$BOXES = array_values($A['blocks']); // array of integers
}
$ETIDS = array();
if (isset($A['etids']) && is_array($A['etids'])) {
$ETIDS = array_values($A['etids']); // array of strings
}
$AETIDS = USER_getAllowedTopics(); // array of strings (fetched, needed to "clean" $TIDS and $ETIDS)
Let us know if it fixes your problem.
One of the Geeklog Core Developers.
I believe this error relates to PHP 7.2 and has been fixed in the upcoming version of Geeklog.
For Geeklog v2.2.0 in usersetting.php around line 1336 replace:
Text Formatted Code
$TIDS = @array_values($A['topics']); // array of strings$AIDS = @array_values($A['selauthors']); // array of integers
$BOXES = @array_values($A['blocks']); // array of integers
$ETIDS = @array_values($A['etids']); // array of strings
$AETIDS = USER_getAllowedTopics(); // array of strings (fetched, needed to "clean" $TIDS and $ETIDS)
with this:
Text Formatted Code
$TIDS = array();if (isset($A['topics']) && is_array($A['topics'])) {
$TIDS = array_values($A['topics']); // array of strings
}
$AIDS = array();
if (isset($A['selauthors']) && is_array($A['selauthors'])) {
$AIDS = array_values($A['selauthors']); // array of integers
}
$BOXES = array();
if (isset($A['blocks']) && is_array($A['blocks'])) {
$BOXES = array_values($A['blocks']); // array of integers
}
$ETIDS = array();
if (isset($A['etids']) && is_array($A['etids'])) {
$ETIDS = array_values($A['etids']); // array of strings
}
$AETIDS = USER_getAllowedTopics(); // array of strings (fetched, needed to "clean" $TIDS and $ETIDS)
Let us know if it fixes your problem.
One of the Geeklog Core Developers.
30
47
Quote
Well, not in my case.
Patched the change in usersettings, and then comes
Though the user data seems to update.
Patched the change in usersettings, and then comes
E_WARNING(2) - sizeof(): Parameter must be an array or an object that implements Countable @ /system/classes/XML/RPC.php line 1724
Though the user data seems to update.
33
35
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1483
Location:Canada
I see there have been some more changes to make Geeklog compatible with 7.2
https://github.com/Geeklog-Core/geeklog/commit/1b6b4408660657e28889ed9b7739332cfedba28a<br />
https://github.com/Geeklog-Core/geeklog/commit/24f907a33e0abf978156e7c513267bb4bf7daf47
One of the Geeklog Core Developers.
https://github.com/Geeklog-Core/geeklog/commit/1b6b4408660657e28889ed9b7739332cfedba28a<br />
https://github.com/Geeklog-Core/geeklog/commit/24f907a33e0abf978156e7c513267bb4bf7daf47
One of the Geeklog Core Developers.
35
31
Quote
All times are EST. The time is now 01:26 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content