[wp-trac] [WordPress Trac] #36926: Autoloading: Introduce compatibility shim for spl_autoload_register

WordPress Trac noreply at wordpress.org
Tue May 24 06:49:45 UTC 2016


#36926: Autoloading: Introduce compatibility shim for spl_autoload_register
-----------------------------------+------------------
 Reporter:  rmccue                 |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  4.6
Component:  General                |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+------------------

Comment (by rmccue):

 Replying to [comment:3 tfrommen]:
 > We actually spoke about it, but it hasn't made it into your code yet.

 Oops, sorry about that! Forgot to incorporate it here.

 While I agree with @dd32 that your warranty is void if you do that, I
 think it makes sense to be defensive here. As it turns out,
 [https://3v4l.org/iddHr PHP throws an exception] if the callback can't be
 found, so we should match that. The array check is also cheap, so makes
 sense to do that.

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


More information about the wp-trac mailing list