While testing a plugin of mine with 4.5 RC of WordPress, after turning on debug in wp-config.php, I noticed an error showing up in a core WP file
Notice: Trying to get property of non-object in /wp-includes/post-template.php on line 289
Through process of elimination (turning off all other plugins until finding the message again), I am thinking this is caused by the options page of my plugin (I suppose it could be the main custom post page possibly), but there is no error message to help point me to where. The error points to a core WP file.
This error does not show up everywhere in the admin, only on certain pages such as on the main pages of Plugins, Dashboard, Users, Comments, Appearance, Settings, and on my options page itself, but oddly NOT on any other edit or post pages of my plugin or posts, or pages, or media of the site.
The code on that line in core is
if ( false !== strpos( $post->post_content, '<!--noteaser-->' ) && ( ! $multipage || $page == 1 ) )
and the strange thing is, my options page has no post content relation, only options, so not sure why this function (part of "get_the_content") is even being called. And since there is no more specific error message than the above, nor one that refers to a line in MY code, I am having trouble finding what part of my code could even be kicking this off.
Can someone recommend a way to troubleshoot this better? Some tool with better, more specific error reporting, or things to try to find and fix the problem? I know it is just a NOTICE, and not fatal, but I would still like to fix it if possible.