views:

293

answers:

1

I'm getting this error on my blog did some one had the same error? how can i fix the error? I didnt edited any File.

  Notice: Undefined property: stdClass::$post_type in /home/a4673438/public_html/wp-includes/link-template.php on line 105

  Notice: Undefined property: stdClass::$post_status in /home/a4673438/public_html/wp-includes/link-template.php on line 112

  Notice: Undefined property: stdClass::$post_type in /home/a4673438/public_html/wp-includes/link-template.php on line 105

  Notice: Undefined property: stdClass::$post_status in /home/a4673438/public_html/wp-includes/link-template.php on line 112

  Notice: Undefined property: stdClass::$post_type in /home/a4673438/public_html/wp-includes/link-template.php on line 105

  Notice: Undefined property: stdClass::$post_status in /home/a4673438/public_html/wp-includes/link-template.php on line 112
  Notice: Undefined property: stdClass::$post_type in /home/a4673438/public_html/wp-includes/link-template.php on line 105

  Notice: Undefined property: stdClass::$post_status in /home/a4673438/public_html/wp-includes/link-template.php on line 112


  Notice: Undefined property: stdClass::$post_type in /home/a4673438/public_html/wp-includes/link-template.php on line 105


  Notice: Undefined property: stdClass::$post_status in /home/a4673438/public_html/wp-includes/link-template.php on line 112

code causing this errors line 112

if ( '' != $permalink && !in_array($post->post_status, array('draft', 'pending')) ) {
 $unixtime = strtotime($post->post_date);

line 105

if ( $post->post_type == 'page' )
     return get_page_link($post->ID, $leavename, $sample);
A: 

Try adding these lines after line #100 in that file:

if($post == null) {
    return '';
}

That might fix the errors, but it might cause side effects in the page. Missing permanent links to your posts, to be exact.

What version of WordPress are you using, anyways?

Atli
i use current 2.86
streetparade