WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#39867 closed defect (bug) (duplicate)

actions overwrite variables

Reported by: tazotodua Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:
PR Number:

Description

hello.
for example,we have:

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..

Change History (1)

#1 @swissspidy
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hey there,

Thanks for your report. This is already being tracked in #14881. See also #14671 for some history.

Note: See TracTickets for help on using tickets.