[wp-trac] [WordPress Trac] #16439: When a plugins needs updating, the core code calls "has_cap" in a deprecated way

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 2 02:13:56 UTC 2011

#16439: When a plugins needs updating, the core code calls "has_cap" in a
deprecated way
 Reporter:  jltallon      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Plugins       |    Version:
 Severity:  normal        |   Keywords:  has_cap, plugin_update_detect
 When WP_DEBUG is enabled, the log continuously spews the following when a
 plugin has a newer version available:

 Notice: has_cap was called with an argument that is deprecated since
 version 2.0! Usage of user levels by plugins and themes is deprecated. Use
 roles and capabilities instead. in /usr/share/wordpress/wp-
 includes/functions.php on line 3381

 Steps to reproduce:

 1.- Enable logging
     define('WP_DEBUG',         true);  // Turn debugging ON

     define('WP_DEBUG_DISPLAY', false); // Turn forced display OFF

     define('WP_DEBUG_LOG',     true);  // Turn logging to wp-

 2.- Activate a plugin which has a newer version

 Steps to "neuter":

 1.- Deactivate plugin

 2.- Remove the plugin from wp-content/plugins

 3.- Switch to another page (a form of "hard refresh")

 The warning seems to come from wp-includes/deprecated.php, but I haven't
 been able to trace it to the original caller so far.

 This is mostly annoying to those of us debugging, and not really an issue
 for production installs.

 Last encountered with the "better delete revisions" plugin

Ticket URL: <http://core.trac.wordpress.org/ticket/16439>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list