When the user is not authorized to see the WP Fail2ban page I get the following notices:
**Notice** : Undefined offset: 2 in **/wp-admin/includes/menu.php** on line **174**
**Notice** : Undefined offset: 2 in **/wp-admin/includes/plugin.php** on line **1855**
**Notice** : Undefined offset: 2 in **/wp-admin/includes/plugin.php** on line **1855**
I don’t know why it reports on those files but I traced the problem to this line -> wp-fail2ban/admin/admin.php:65
$submenu['wp-fail2ban'][0][0] = __( 'Welcome' );
So when the user is unauthorized, the index ‘wp-fail2ban’ doesn’t exist, my temp fix:
if (isset($submenu['wp-fail2ban'])) {
$submenu['wp-fail2ban'][0][0] = __( 'Welcome' );
}
Hope you can take a look into it, thanks in advance