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

WordPress Trac noreply at wordpress.org
Sun Nov 29 22:35:52 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 hellofromTonya):

 First pass implementation is ready for review and discussion in
 [https://github.com/WordPress/wordpress-develop/pull/777 PR 777].

 - Applies `_doing_it_wrong()` to `WP_Hook::apply_filters` (which also
 applies it to `WP_Hook::do_action`.
 - Adds test coverage for the changes.

 Once we get agreement on it, then the same treatment can be applied to
 `WP_Hook::do_all_hook()` and elevate the error level to `E_USER_WARNING`.

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


More information about the wp-trac mailing list