Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Trying to get property of non-object notice

$
0
0

Replies: 0

Getting these two notices:


PHP Notice:  Trying to get property of non-object in /var/www/wordpress/wp-includes/post-template.php on line 298
PHP Notice:  Undefined offset: 0 in /var/www/habitualmente.com/html/wp-content/plugins/easy-footnotes/easy-footnotes.php on line 72

This is the line within wp-includes/post-template.php that throws the notice:

	if ( false !== strpos( $post->post_content, '<!--noteaser-->' ) && ( ! $multipage || $page == 1 ) )
		$strip_teaser = true;

Seems to be caused by line 69 in easy-footnotes.php:

preg_match_all( $pattern, get_the_content(get_the_ID()), $shortcodes );

$post doesn’t seem to be set so the post_content doesn’t exists.

The footnotes and counting still works properly. When I remove the line from the plugin I don’t get the notice anymore. Not sure why exactly it’s happening.

Best regards


Viewing all articles
Browse latest Browse all 59525

Trending Articles