[wp-trac] [WordPress Trac] #14881: do_action should not pass empty string by default

WordPress Trac noreply at wordpress.org
Mon Feb 13 22:54:00 UTC 2017


#14881: do_action should not pass empty string by default
---------------------------------+-----------------------------
 Reporter:  nacin                |       Owner:
     Type:  defect (bug)         |      Status:  new
 Priority:  normal               |   Milestone:  Future Release
Component:  Plugins              |     Version:
 Severity:  normal               |  Resolution:
 Keywords:  has-patch 3.2-early  |     Focuses:
---------------------------------+-----------------------------

Comment (by tazotodua):

 will this ever be solved?
 for example,we have:

 {{{#!php
 add_action('wp_head','my_function');

 function my_function($first=false){
     var_dump($first); exit;
 }

 }}}

 it doesnt show false, instead something empty string is passed from the
 action... why? I think actions should not touch the arguments of
 functions..

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


More information about the wp-trac mailing list