WordPress.org

Ready to get started?Download WordPress

Forums

Simple Page Specific Sidebars
[resolved] [PATCH] Trying to get property of non-object (2 posts)

  1. flynsarmy
    Member
    Posted 11 months ago #

    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/

  2. Patrick Jackson
    Member
    Plugin Author

    Posted 1 month ago #

    Thanks, flynsarmy! This patch is included in the next update to be posted soon.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.