Opened 20 years ago
Closed 20 years ago
#3125 closed defect (bug) (fixed)
do_action no longer handling array() arguments
| Reported by: | dwc | Owned by: | ryan |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
A recent change to do_action (some combination of [4176] and [4177]?) seems to have broken the few actions which pass an array containing more than one argument:
./wp-admin/admin-functions.php:478: do_action('check_passwords', array ($user->user_login, & $pass1, & $pass2));
./wp-includes/comment.php:698: do_action('pre_ping', array(&$post_links, &$pung));
./wp-login.php:191: do_action('wp_authenticate', array(&$user_login, &$user_pass));
Previously do_action would "unwrap" these arguments and pass them to plugin functions. Now, plugins get the array itself, causing errors like:
Missing argument 2 for authenticate()
This occurs regardless of how many arguments the plugin claims to accept in its add_action() call.
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
We're trying to rationalize when arrays are exploded into separate args. Introducing do_action_ref_array() for supporting those instances where we want to explode an array in order to do call time pass by reference.