Trying to get property of non-object in error + ocassional Internal Server Error
-
Hello, I would really appreciate some help here as It’s all above my ability to be honest. My website seems to be hanging upon load and then ocassionally giving me an “Internal server error” and additional 500 error. Other than that it works fine apart from being slow which I think is due to this issue.
I ran a debug and have the following error when I get the “internal server error”
[08-Feb-2017 15:06:27 UTC] PHP Notice: Trying to get property of non-object in /home/mediaraft/public_html/wp-includes/link-template.php on line 317
[08-Feb-2017 15:06:27 UTC] PHP Notice: Trying to get property of non-object in /home/mediaraft/public_html/wp-includes/link-template.php on line 331Does anyone know what this could be? I’m pulling my hair out trying to figure it out but it’s just beyond my understanding.
This is the code on line 317 in link-template.php
if ( ‘page’ == get_option( ‘show_on_front’ ) && $post->ID == get_option( ‘page_on_front’ ) )
$link = home_url(‘/’);
else
$link = _get_page_link( $post, $leavename, $sample );331 is:
return apply_filters( ‘page_link’, $link, $post->ID, $sample );
Thanks
James
- The topic ‘Trying to get property of non-object in error + ocassional Internal Server Error’ is closed to new replies.