[wp-trac] [WordPress Trac] #18461: adding a capability to a non-existing role gives warnings
WordPress Trac
wp-trac at lists.automattic.com
Wed Aug 17 10:47:32 UTC 2011
#18461: adding a capability to a non-existing role gives warnings
-----------------------------+-----------------------------
Reporter: opajaap | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Role/Capability | Version: 3.2.1
Severity: normal | Keywords:
-----------------------------+-----------------------------
When a plugin does something like this:
global $wp_roles;
$wp_roles->add_cap('a_nonexistent_role', 'any_capability');
no error (about the non-existance of the role) is displayed.
However, each subsequent page request produces this errormessage:
Notice: Undefined index: name in /mnt/web7/...../wordpress/wp-
includes/capabilities.php on line 113
Debug is on: define('WP_DEBUG', true); in wp-config.php
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18461>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list