Make WordPress Core

Opened 20 years ago

Closed 20 years ago

Last modified 19 years ago

#2298 closed defect (bug) (fixed)

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

Reported by: nielshackius's profile nielshackius Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: Administration Keywords: add_role, capabilties.php, plugin bg|has-patch bg|commit
Focuses: 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 (7)

#1 @ryan
20 years ago

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

#2 @davidhouse
20 years ago

  • Keywords bg|has-patch added

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

#3 @davidhouse
20 years ago

  • Keywords bg|commit added

#4 @ringmaster
20 years ago

  • Milestone set to 2.0.1

This is low-hanging and needs a quick fix.

#5 @ryan
20 years ago

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

#6 @ryan
20 years ago

  • Resolution set to fixed
  • Status changed from new to closed

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

#7 @(none)
19 years ago

  • Milestone 2.0.1 deleted

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.