Support » Plugin: Multisite Enhancements » 2 PHP Notices to fix please

  • Resolved buddywhatshisname

    (@vhmarkgmailcom)


    PHP Notice: Undefined property: stdClass::$blogs in wp-content/plugins/multisite-enhancements/inc/autoload/class-admin-bar-tweaks.php on line 49
    PHP Notice: Undefined property: stdClass::$blogs in wp-content/plugins/multisite-enhancements/inc/autoload/class-admin-bar-tweaks.php on line 93

    We are on PHP 7.0.x

    Suggested untested code line 49:

    
    		if ( isset($wp_admin_bar->user->blogs) && count( $wp_admin_bar->user->blogs ) < 1 ) {
    			return;
    		}
    

    Suggested untested code line 93:

    
    		global $wp_admin_bar;
    
    		if(!isset($wp_admin_bar->user->blogs) {
    		    return;
    		}
    		foreach ( (array) $wp_admin_bar->user->blogs as $blog ) {
    		    ...
    
  • The topic ‘2 PHP Notices to fix please’ is closed to new replies.