Something went wrong while setting issue due date.
PHP >= 7.2 triggering error when count() is called with invalid countable
Closed
PHP >= 7.2 triggering error when count() is called with invalid countable
With PHP > 7.2 count() returns a warning when called on an uncountable (https://secure.php.net/manual/en/function.count.php#refsect1-function.count-changelog)
All credits for finding the problem goes to MCMic_w on #fusiondirectory
Traceback:
=== /Error ===
=== Trace ===
Trace[1]:class objects / function ls
File : /usr/share/webapps/fusiondirectory/plugins/personal/roles/class_userRoles.inc
Line : 103
Type : static
array("ogroup"),"cn","dc=example,dc=de","(member=uid=aea-fd-admin,ou=people,dc=example,dc=de)"
Trace[2]:class userRoles / function __construct
File : /usr/share/webapps/fusiondirectory/include/simpleplugin/class_simpleTabs.inc
Line : 92
Type : method
"cn=cloud-user,ou=groups,dc=example,dc=de",CLASS: user,CLASS: simpleTabs,""
Trace[3]:class simpleTabs / function __construct
File : /usr/share/webapps/fusiondirectory/include/class_objects.inc
Line : 249
Type : method
"USER","uid=aea-fd-admin,ou=people,dc=example,dc=de"
Trace[4]:class objects / function open
File : /usr/share/webapps/fusiondirectory/include/simpleplugin/class_simpleManagement.inc
Line : 878
Type : static
"uid=aea-fd-admin,ou=people,dc=example,dc=de","USER"
Trace[5]:class simpleManagement / function editEntry
File : /usr/share/webapps/fusiondirectory/include/simpleplugin/class_simpleManagement.inc
Line : 929
Type : method
"edit",array(),array(array("uid=aea-fd-admin,ou=people,dc=example,dc=de"),"edit")
Trace[6]:class simpleManagement / function handleActions
File : /usr/share/webapps/fusiondirectory/include/simpleplugin/class_simpleManagement.inc
Line : 556
Type : method
array(array("uid=aea-fd-admin,ou=people,dc=example,dc=de"),"edit")
Trace[7]:class simpleManagement / function execute
File : /usr/share/webapps/fusiondirectory/include/simpleplugin/class_simpleManagement.inc
Line : 1339
Type : method
-
Trace[8]:class simpleManagement / function mainInc
File : /usr/share/webapps/fusiondirectory/plugins/admin/users/main.inc
Line : 22
Type : static
"userManagement"
Trace[9]:function require
File : /usr/share/webapps/fusiondirectory/html/main.php
Line : 284
Type : -
"/usr/share/webapps/fusiondirectory/plugins/admin/users/main.inc"
=== /Trace ====== Error === PHP error: count(): Parameter must be an array or an object that implements Countable (/usr/share/webapps/fusiondirectory/include/class_objects.inc, line 73)
=== /Error ===
=== Trace ===
Trace[1]:class objects / function ls
File : /usr/share/webapps/fusiondirectory/plugins/personal/roles/class_userRoles.inc
Line : 140
Type : static
array("role"),"cn","dc=example,dc=de","(roleOccupant=uid=aea-fd-admin,ou=people,dc=example,dc=de)"
Trace[2]:class userRoles / function __construct
File : /usr/share/webapps/fusiondirectory/include/simpleplugin/class_simpleTabs.inc
Line : 92
Type : method
"cn=cloud-user,ou=groups,dc=example,dc=de",CLASS: user,CLASS: simpleTabs,""
Trace[3]:class simpleTabs / function __construct
File : /usr/share/webapps/fusiondirectory/include/class_objects.inc
Line : 249
Type : method
"USER","uid=aea-fd-admin,ou=people,dc=example,dc=de"
Trace[4]:class objects / function open
File : /usr/share/webapps/fusiondirectory/include/simpleplugin/class_simpleManagement.inc
Line : 878
Type : static
"uid=aea-fd-admin,ou=people,dc=example,dc=de","USER"
Trace[5]:class simpleManagement / function editEntry
File : /usr/share/webapps/fusiondirectory/include/simpleplugin/class_simpleManagement.inc
Line : 929
Type : method
"edit",array(),array(array("uid=aea-fd-admin,ou=people,dc=example,dc=de"),"edit")
Trace[6]:class simpleManagement / function handleActions
File : /usr/share/webapps/fusiondirectory/include/simpleplugin/class_simpleManagement.inc
Line : 556
Type : method
array(array("uid=aea-fd-admin,ou=people,dc=example,dc=de"),"edit")
Trace[7]:class simpleManagement / function execute
File : /usr/share/webapps/fusiondirectory/include/simpleplugin/class_simpleManagement.inc
Line : 1339
Type : method
-
Trace[8]:class simpleManagement / function mainInc
File : /usr/share/webapps/fusiondirectory/plugins/admin/users/main.inc
Line : 22
Type : static
"userManagement"
Trace[9]:function require
File : /usr/share/webapps/fusiondirectory/html/main.php
Line : 284
Type : -
"/usr/share/webapps/fusiondirectory/plugins/admin/users/main.inc"
=== /Trace ===```