[wp-trac] [WordPress Trac] #39867: actions overwrite variables
WordPress Trac
noreply at wordpress.org
Mon Feb 13 22:26:19 UTC 2017
#39867: actions overwrite variables
--------------------------+-----------------------------
Reporter: tazotodua | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
hello.
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/39867>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list