#16439 closed defect (bug) (invalid)
When a plugins needs updating, the core code calls "has_cap" in a deprecated way
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Plugins | Keywords: | has_cap, plugin_update_detect |
Focuses: | Cc: |
Description
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-content/debug.log
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
The problem is in the plugin itself:
It should be
'manage_options'
instead of 8.