WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#5520 closed defect (bug) (fixed)

incorrect type for default arg in add_role()

Reported by: 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 6 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 lloydbudd6 years ago

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

comment:2 ryan6 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.