Support » Plugin: Adminimize » PHP Warning: in_array() expects parameter 2 to be array

  • I am getting lots of these errors in my debug.log:

    [24-May-2015 02:50:13 UTC] PHP Warning: in_array() expects parameter 2 to be array, string given in /home/public_html/wp-content/plugins/adminimize/adminimize.php on line 901

    Line 901:
    if ( isset( $mw_adminimize_menu ) && in_array( $item[ 2 ], $mw_adminimize_menu ) ) {
    					unset( $menu[ $index ] );
    }

    Possible fix by adding an in_array condition check for $mw_adminimize_menu:

    if ( isset( $mw_adminimize_menu ) && in_array($mw_adminimize_menu) && in_array( $item[ 2 ], $mw_adminimize_menu ) ) {
    					unset( $menu[ $index ] );
    }

    Let me know what you think!

    https://wordpress.org/plugins/adminimize/

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP Warning: in_array() expects parameter 2 to be array’ is closed to new replies.