Ticket #2298 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

add_role(), capabilties.php typo otherwise plugins might not work as expected

Reported by: nielshackius Assigned to: anonymous
Priority: normal Milestone:
Component: Administration Version: 2.0
Severity: normal Keywords: add_role, capabilties.php, plugin bg|has-patch bg|commit
Cc:

Description

In wp-includes/capabilities.php in line 325 is:

return $wp_roles->add_role($role, $display_name, $capabilities = '');

but really should be, since capabilties is really set locally by the functions

return $wp_roles->add_role($role, $display_name, $capabilities);

If not: The third argument of add_role won't work as expected.

Change History

01/16/06 19:54:12 changed by ryan

The third argument is intended to be optional. See how it is used in populate_roles_160() in wp-admin/upgrade-schema.php.

01/16/06 21:31:14 changed by davidhouse

  • keywords changed from add_role, capabilties.php, plugin to add_role, capabilties.php, plugin bg|has-patch.

Yes, but this is a call, not a function definition, Ryan ;) Valid bug.

01/18/06 11:10:38 changed by davidhouse

  • keywords changed from add_role, capabilties.php, plugin bg|has-patch to add_role, capabilties.php, plugin bg|has-patch bg|commit.

01/25/06 01:58:40 changed by ringmaster

  • milestone set to 2.0.1.

This is low-hanging and needs a quick fix.

01/25/06 03:39:35 changed by ryan

If I could read, I might be dangerous. :-)

01/25/06 03:40:02 changed by ryan

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

(In [3482]) add_role() fix from nielshackius. fixes #2298

11/30/06 19:41:49 changed by

  • milestone deleted.

Milestone 2.0.1 deleted