Archived topic
PHP Notice - Header and Disable-Elements
4 replies · Started by shwebteam on December 29, 2016
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
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
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?
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
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.