[wp-trac] [WordPress Trac] #51894: PHP 8: Invalid functions added to hooks now cause fatals

WordPress Trac noreply at wordpress.org
Tue Dec 1 05:31:39 UTC 2020


#51894: PHP 8: Invalid functions added to hooks now cause fatals
-------------------------------------------+---------------------
 Reporter:  dlh                            |       Owner:  (none)
     Type:  enhancement                    |      Status:  new
 Priority:  normal                         |   Milestone:  5.6
Component:  Plugins                        |     Version:
 Severity:  normal                         |  Resolution:
 Keywords:  php8 has-patch has-unit-tests  |     Focuses:
-------------------------------------------+---------------------

Comment (by TimothyBlynJacobs):

 Has this been benched?

 Separately, I don't really understand the motivation for this change. This
 is a clear programming error that isn't likely to vary at runtime. The
 function is either defined, or isn't defined. Unlike the typesafe hook
 issues, it would be highly unlikely for a function to no longer be defined
 because of persisted data or other plugins being active. As such, we'd be
 adding a performance cost to the hottest code path in WordPress to catch a
 quite unlikely event.

 Additionally, this is something that Recovery Mode should be able to let
 the site owner recover from.

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


More information about the wp-trac mailing list