WordPress.org

Ready to get started?Download WordPress

Forums

Per Page Sidebars
A minor bug where 404 error pages result in PHP error (1 post)

  1. BigWilliam
    Member
    Posted 1 year ago #

    I haven't found out how to contact the author of this plugin (Brian) so I'm posting this here.

    (A minor bug - only shows up when debugging is set to 'true' in wp-config.php):

    If the user goes to a WordPress page that doesn't exist, then this plugin throws an error, which, if debugging is turned on, will display ugly text at the top of the page like so:

    "Trying to get property of non-object in ... " (for 3 lines)

    In order to fix this, I just added this to line 210 in per-page-sidebars.php:
    if ( !$hostpost ) {
    return;
    }

    This way, if the object isn't there it just returns before trying to set values, etc.
    I know this isn't really that big of a deal, but it's a small detail that can help.

    If I could have found Brian's email I would have just emailed him directly. Hopefully he sees this.

    http://wordpress.org/extend/plugins/per-page-sidebars/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.