[wp-trac] [WordPress Trac] #31703: Trying to get property of non-object in nav-menu.php

WordPress Trac noreply at wordpress.org
Wed Mar 25 19:04:05 UTC 2015


#31703: Trying to get property of non-object in nav-menu.php
---------------------------+-----------------------------
 Reporter:  mehulkaklotar  |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Future Release
Component:  Menus          |     Version:  trunk
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:
---------------------------+-----------------------------

Comment (by johnjamesjacoby):

 Replying to [comment:5 DrewAPicture]:
 > I'd be interested to know under what circumstances the `object_id`
 wouldn't be set, thereby causing `get_post()` to return null. Seems like
 we first need to identify the cause of the reported problem before we talk
 about solutions.
 >
 > Punting to future release.

 Without testing, it's plausible something like BuddyPress could cause
 this. It inserts a custom menu group for it's logged in user profile pages
 that are not real pages, though even in that instance it would be on us to
 override any values such as these if possible, and also on us to send
 patches upstream if not possible.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31703#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list