WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [PATCH] Trying to get property of non-object

[Resolved] [PATCH] Trying to get property of non-object

  • With WP_DEBUG enabled I’m getting

    Notice: Trying to get property of non-object in /path/to/wp-content/plugins/page-specific-sidebars/page-specific-sidebars.php on line 268

    Pretty simple solution to this one. In method home_pg_id() change

    return $pg->ID;

    to

    if ( $pg )
        return $pg->ID;
    
    // No page found
    return 0;

    http://wordpress.org/plugins/page-specific-sidebars/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [PATCH] Trying to get property of non-object’ is closed to new replies.