Browse Source

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

Nate 5 năm trước cách đây
mục cha
commit
40ec1a586b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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";