Ticket #5520 (closed defect: fixed)

Opened 7 months ago

Last modified 3 months ago

incorrect type for default arg in add_role()

Reported by: tellyworth Assigned to: anonymous
Priority: normal Milestone: 2.6
Component: General Version: 2.5
Severity: normal Keywords: has-patch
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

add_role_default_arg-r6450.patch (0.7 kB) - added by tellyworth on 12/23/07 23:07:56.

Change History

12/23/07 23:07:56 changed by tellyworth

  • attachment add_role_default_arg-r6450.patch added.

12/23/07 23:13:52 changed by lloydbudd

  • version set to 2.4.
  • milestone changed from 2.5 to 2.4.

04/16/08 21:56:04 changed by ryan

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

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