WordPress.org

Forums

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

  1. flynsarmy
    Member
    Posted 1 year 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 11 months ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Page Specific Sidebars
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.