Prechádzať zdrojové kódy

Menu - Edit: Fix items counter (0) when no menu items.

Nate 5 rokov pred
rodič
commit
cb6e9552ed
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      core/menu/menu_item_list.php

+ 1 - 1
core/menu/menu_item_list.php

@@ -414,7 +414,7 @@ function build_db_child_menu_list ($db, $menu_item_level, $menu_item_uuid) {
 	echo "	}\n";
 
 //update number of menu items
-	echo "	document.getElementById('num_rows').innerHTML = '".$x."';\n";
+	echo "	document.getElementById('num_rows').innerHTML = '".($x ?: 0)."';\n";
 
 	echo "</script>\n";