Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#18526 closed defect (bug) (worksforme)

nav_menu.php in wp-admin\includes Error

Reported by: wpsmith's profile wpsmith Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: reporter-feedback
Focuses: Cc:

Description

Notice: Trying to get property of non-object

This occurs at line 59, $original_title = $original_object->post_title;

Simply changing this to $original_title = isset( $original_object->post_title ) ? $original_object->post_title : ; resolves it.

Change History (3)

#1 in reply to: ↑ description @wpsmith
13 years ago

Replying to wpsmith:

Notice: Trying to get property of non-object

This occurs at line 59, $original_title = $original_object->post_title;

Simply changing this to

$original_title = isset( $original_object->post_title ) ? $original_object->post_title : '';

resolves it.

The same error appears on nav_menu.php in wp-includes line 568. Same solution will resolve it.

$original_title = isset( $original_object->post_title ) ? $original_object->post_title : '';


#2 @SergeyBiryukov
13 years ago

  • Keywords reporter-feedback added

So get_post() the line before returns null?

I tried to create a page, add it to a menu, then delete it permanently, and still didn't get the error. What are the steps to reproduce it?

#3 @nacin
13 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.