Update user_settings.php (#4651)
remove potential for "Warning: sizeof(): Parameter must be an array or an object that implements Countable"
This commit is contained in:
parent
a9e37f2268
commit
b42fd99b78
|
|
@ -280,7 +280,7 @@
|
||||||
unset($user_settings);
|
unset($user_settings);
|
||||||
|
|
||||||
// check or uncheck all category checkboxes
|
// check or uncheck all category checkboxes
|
||||||
if (sizeof($subcat_ids) > 0) {
|
if (is_array($subcat_ids) && sizeof($subcat_ids) > 0) {
|
||||||
echo "<script>\n";
|
echo "<script>\n";
|
||||||
echo " function check(what, category) {\n";
|
echo " function check(what, category) {\n";
|
||||||
foreach ($subcat_ids as $user_setting_category => $checkbox_ids) {
|
foreach ($subcat_ids as $user_setting_category => $checkbox_ids) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue