[wp-trac] [WordPress Trac] #28728: null post object bug back in 4.0-alpha-20140702
WordPress Trac
noreply at wordpress.org
Thu Jul 3 14:18:19 UTC 2014
#28728: null post object bug back in 4.0-alpha-20140702
--------------------------+-----------------------------
Reporter: lilaeamedia | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
This is a follow-up to #21394.
query.php throws a notice when is_front_page is used prior to post
selection.
Offending line is wp-includes/query.php:4543:
`$page_obj = $this->get_queried_object();`
Fixed by wrapping in
`if ($page_obj = $this->get_queried_object()) { ... }`
You may have better solution.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28728>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list