[Resolved] PHP Notice – Header and Disable-Elements

Home Forums Support [Resolved] PHP Notice – Header and Disable-Elements

Home Forums Support PHP Notice – Header and Disable-Elements

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #258706
    shwebteam

    Hi,

    since we are having problems with the default wp-gallery (has nothing to do with gp)
    I turned on the debug display to look for errors.

    Now I noticed the following PHP Errors:

    Notice: Trying to get property of non-object in … wp-content/plugins/gp-premium/page-header/functions/functions.php on line 421

    Notice: Trying to get property of non-object in /wp-content/plugins/gp-premium/disable-elements/functions/functions.php on line 250

    WP: 4.7
    GP: 1.2.92

    Regards

    #258746
    shwebteam

    also noticed this in the right sidebar:
    Notice: Trying to get property of non-object in …/wp-content/themes/generatepress/functions.php on line 357

    #258864
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    These looks like issues with the $post global variable which WordPress sets on every page and post.

    What page are you seeing these notices on?

    #258882
    shwebteam

    Hi Tom,

    it was only on the blog and single blog post page
    however suddenly they’re gone. No more error notices.

    I was fixing errors we had with other plugins / scripts
    maybe one of them was causing this, though I can’t trace it back
    at this point but everything is working as it’s supposed to.

    thx anyway, really like your work.
    Regards

    #258893
    Tom
    Lead Developer
    Lead Developer

    Glad it’s working now – those $post variables are wrapped inside an isset function to avoid notices like this, so I assume one of those other errors was causing the issue.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.