• Resolved bbrenter

    (@bbrenter)


    When b-blocks is used in combination with a plugin that alters the visible items in admin backend it produces the following error:

    
    Trying to access array offset on value of type null in /wp-content/plugins/b-blocks/inc/AdminMenu.php on line 50
    
    Trying to access array offset on value of type null in /wp-content/plugins/b-blocks/inc/AdminMenu.php on line 51
    

    it can be solved if orderSubMenu function checks if the array-key exists before accessing it:

    if (array_key_exists('b-blocks', $submenu)) {
                		$arr = array();
                        $arr[] = $submenu['b-blocks'][1]; // Help
                        $arr[] = $submenu['b-blocks'][2]; // Upgrade || Account
                        $submenu['b-blocks'] = $arr;
            }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trying to access array offset on value of type null’ is closed to new replies.