[wp-trac] [WordPress Trac] #35013: WP4.4 function handle_404 yelds a fatal error on line 613 when trying to clone $wp_query->post if it's not an object
WordPress Trac
noreply at wordpress.org
Tue Dec 22 15:29:15 UTC 2015
#35013: WP4.4 function handle_404 yelds a fatal error on line 613 when trying to
clone $wp_query->post if it's not an object
------------------------------------------+-------------------------
Reporter: jdmweb | Owner: swissspidy
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.4.1
Component: Bootstrap/Load | Version: 4.4
Severity: normal | Resolution:
Keywords: has-patch commit fixed-major | Focuses:
------------------------------------------+-------------------------
Comment (by igmoweb):
Replying to [comment:12 dd32]:
> Any reason this is using `instanceof` instead of just checking it's non-
falsey? Is there any benefit to being explicit?
>
> eg:
> {{{
> if ( $wp_query->post ) {
> $p = clone $wp_query->post;
> }
> }}}
Because there are some lines later making reference to WP_Post attributes
like $p->post_content.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35013#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list