Wordpress Undefined özellik: stdClass :: $ post_type

2 Cevap php

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);

2 Cevap

: Bu satırları o dosyada after hat # 100 eklemeyi deneyin

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

Bu hataları düzeltmek olabilir, ama bu sayfada yan etkilere neden olabilir. Yazılarınızın Eksik kalıcı bağlantılar, kesin olmalıdır.

Eğer zaten, WordPress hangi sürümünü kullanıyorsunuz?

Ben (MAMP yoluyla) lokal olarak WordPress çalışan iken, bu hatayı fark ettik ve ben (benim kablosuz bağlantı kapatarak örneğin) internete bağlı değildi. Bildirimler en kısa sürede benim ağ bağlantısını yeniden tesis olarak kayboldu. Bu bir hata galiba bu.