Make WordPress Core

Opened 17 years ago

Closed 16 years ago

#5520 closed defect (bug) (fixed)

incorrect type for default arg in add_role()

Reported by: tellyworth's profile tellyworth Owned by:
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.5
Component: General Keywords: has-patch
Focuses: Cc:

Description

The add_role() function uses a string as the default $capabilities argument. Other code assumes it's an array. This causes a warning in get_role_caps() if the default is used.

The patch changes the default to an empty array.

Attachments (1)

add_role_default_arg-r6450.patch (687 bytes) - added by tellyworth 17 years ago.

Download all attachments as: .zip

Change History (3)

#1 @lloydbudd
17 years ago

  • Milestone changed from 2.5 to 2.4
  • Version set to 2.4

#2 @ryan
16 years ago

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

(In [7701]) Default cap arg should be an empty array. Props tellyworth. fixes #5520

Note: See TracTickets for help on using tickets.