[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 20:04:32 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 mehulkaklotar):
Replying to @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.
I got the case. I have a widget in footer which has a Custom Menu widget.
Now the Menu has a shopping cart page which gives a null object for
`get_post()`. This page is from woocommerce menu which causes the error.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31703#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list