Эх сурвалжийг харах

Update user_settings.php (#4651)

remove potential for "Warning: sizeof(): Parameter must be an array or an object that implements Countable"
chansizzle 6 жил өмнө
parent
commit
857a4cb447

+ 1 - 1
core/user_settings/user_settings.php

@@ -280,7 +280,7 @@
 	unset($user_settings);
 
 	// check or uncheck all category checkboxes
-	if (sizeof($subcat_ids) > 0) {
+	if (is_array($subcat_ids) && sizeof($subcat_ids) > 0) {
 		echo "<script>\n";
 		echo "	function check(what, category) {\n";
 		foreach ($subcat_ids as $user_setting_category => $checkbox_ids) {