diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php
index 32a37f106a..30a37d5ad9 100644
|
a
|
b
|
function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, |
| 1389 | 1389 | $submenu[ $parent_slug ][] = $new_sub_menu; |
| 1390 | 1390 | } else { |
| 1391 | 1391 | // If position is equal or higher than the number of items in the array, append the submenu. |
| 1392 | | if ( $position >= count( $submenu[ $parent_slug ] ) ) { |
| | 1392 | if ( is_countable( $submenu[ $parent_slug ] ) && $position >= count( $submenu[ $parent_slug ] ) ) { |
| 1393 | 1393 | $submenu[ $parent_slug ][] = $new_sub_menu; |
| 1394 | 1394 | } else { |
| 1395 | 1395 | // Test for a negative position. |