[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
Wed Dec 16 22:17:37 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:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  4.4.1
Component:  Bootstrap/Load    |     Version:  4.4
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+--------------------

Comment (by igmoweb):

 Replying to [comment:6 swissspidy]:
 > We can't unit test fatal errors, but [attachment:35013.patch] (with
 curly braces though :)) looks good.

 Thanks @swissspidy. I still don't use curly braces on ifs with single
 lines due to old PHP Coding Standards. Do we need to add them in the
 patch?

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


More information about the wp-trac mailing list