[wp-trac] [WordPress Trac] #48817: do_action_deprecated and apply_filters_deprecated $replacement param should default to null

WordPress Trac noreply at wordpress.org
Wed Nov 27 20:59:10 UTC 2019


#48817: do_action_deprecated and apply_filters_deprecated $replacement param should
default to null
---------------------------------------------------+---------------------
 Reporter:  felipeelia                             |       Owner:  (none)
     Type:  defect (bug)                           |      Status:  new
 Priority:  normal                                 |   Milestone:  5.4
Component:  Plugins                                |     Version:
 Severity:  normal                                 |  Resolution:
 Keywords:  good-first-bug dev-feedback has-patch  |     Focuses:
---------------------------------------------------+---------------------

Comment (by SergeyBiryukov):

 Hi @shaampk1, thanks for the patch! However, looks like that's not quite
 what the ticket meant.

 Unlike arrays, `sprint()` calls don't require the extra comma and in fact
 will produce a syntax error with that change.

 The suggested change is to switch `$replacement = false` in
 [source:tags/5.3/src/wp-includes/plugin.php?marks=626,653#L616 lines 626
 and 653] of `wp-includes/plugin.php` to `$replacement = null`, as that is
 the value being checked in `_deprecated_hook()` and other related
 functions, see [source:tags/5.3/src/wp-
 includes/functions.php?marks=4839#L4828 line 4839] in `wp-
 includes/functions.php`.

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


More information about the wp-trac mailing list