Ticket #3125 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

do_action no longer handling array() arguments

Reported by: dwc Assigned to: ryan
Priority: normal Milestone:
Component: General Version:
Severity: normal Keywords:
Cc:

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

09/12/06 17:14:45 changed by ryan

  • owner changed from anonymous to ryan.

09/12/06 17:44:36 changed by ryan

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.

09/12/06 17:45:27 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [4186]) do_action_ref_array(). fixes #3125