Title: 1 argument that needs patching
Last modified: August 21, 2016

---

# 1 argument that needs patching

 *  Resolved [master412160](https://wordpress.org/support/users/master412160/)
 * (@master412160)
 * [12 years ago](https://wordpress.org/support/topic/1-argument-that-needs-patching/)
 * Not a notice or bug but I do get this;
 * wp-admin/menu-header.php:139 – Usage of user levels by plugins and themes is 
   deprecated. Use roles and capabilities instead.
 * [https://wordpress.org/plugins/wp-spamshield/](https://wordpress.org/plugins/wp-spamshield/)

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/1-argument-that-needs-patching/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/1-argument-that-needs-patching/page/2/?output_format=md)

 *  Plugin Contributor [redsand](https://wordpress.org/support/users/redsand/)
 * (@redsand)
 * [12 years ago](https://wordpress.org/support/topic/1-argument-that-needs-patching/#post-4997192)
 * Hi master412160,
 * I’ve looked into that one extensively. There’s actually no bug in the plugin.(
   At least not from what I can tell…after a LOT of testing, researching, etc.) 
   I’ve checked that particular notice with DEBUG on and nothing causes it to go
   away. I honestly think there must be some kind of strange quirk or bug with WordPress
   because the code that calls that function is literally copied and pasted from
   the WordPress Codex. In a few places in the plugin I have to verify user capabilities.
   The code used in the plugin is `current_user_can('moderate_comments')` and `current_user_can('
   manage_options')` and there hasn’t been reference to user levels as of a long
   time ago.
 * The example given in the WordPress Codex is :
 *     ```
       if ( current_user_can('moderate_comments') ) {
        echo 'The current user can moderate comments';
       }
       ```
   
 * so you can see it’s exactly the same usage.
 * The codex entries for the function “current_user_can()” is:
    [http://codex.wordpress.org/Function_Reference/current_user_can](http://codex.wordpress.org/Function_Reference/current_user_can)…
   and User Roles and Capabilities is: [http://codex.wordpress.org/Roles_and_Capabilities](http://codex.wordpress.org/Roles_and_Capabilities)
 * I’ve pretty much memorized those pages inside and out, backwards and forwards,
   and still can’t see anything would cause it.
 * All I can do on this one is recommend not running a production site with DEBUG
   on. But that’s completely your call. 🙂 If you (or anyone else) happen to find
   a solution I don’t know about, I’m open to suggestions.
 * – Scott
 *  Thread Starter [master412160](https://wordpress.org/support/users/master412160/)
 * (@master412160)
 * [12 years ago](https://wordpress.org/support/topic/1-argument-that-needs-patching/#post-4997324)
 * I see good and detailed explanation you gave me.
 * Did you bring this up with any other developer? To see if they maybe spot what
   is causing or you can submit it as a possible core bug to the trac here on wordpress?
 *  Plugin Contributor [redsand](https://wordpress.org/support/users/redsand/)
 * (@redsand)
 * [12 years ago](https://wordpress.org/support/topic/1-argument-that-needs-patching/#post-4997359)
 * Thanks. I haven’t yet, but it’s definitely on the To Do list. I’m going to do
   some more testing first. I like to be able to recreate a problem consistently
   before I submit it as a bug. I know what it’s like trying to diagnose a problem
   that’s not consistent…it’s like shooting in the dark. The WP Devs have enough
   work to do already so I just want to have more info to give them first.
 *  Plugin Contributor [redsand](https://wordpress.org/support/users/redsand/)
 * (@redsand)
 * [12 years ago](https://wordpress.org/support/topic/1-argument-that-needs-patching/#post-4997367)
 * One thing I forgot to mention…when I was testing, I did a couple things to prove
   a point…I copied and pasted the exact implementations of the code from the WordPress
   core itself into the plugin. Still happened. Then, I went further and even created
   a test version of the plugin that had no references whatsoever to the “current_user_can()”
   function at all. It still happened. So there definitely is something else going
   on. I’m wondering if there is a WordPress function that is incorrectly calling
   it. I’m going to look into the WP Core files to look into it.
 *  Thread Starter [master412160](https://wordpress.org/support/users/master412160/)
 * (@master412160)
 * [12 years ago](https://wordpress.org/support/topic/1-argument-that-needs-patching/#post-4997390)
 * It seems so. Often enough people tend to look over things like this with their
   own creation. A new set of eyes may resolve this for you.
 * I don’t mean to offend you its like when you write a document you sometimes read
   over typos everytime you re-read it until you let someone else read it and they
   spot it for you. 🙂
 * Also good luck! Hopefully you’ll find your answer there somewhere.
 *  Plugin Contributor [redsand](https://wordpress.org/support/users/redsand/)
 * (@redsand)
 * [12 years ago](https://wordpress.org/support/topic/1-argument-that-needs-patching/#post-4997392)
 * Trust me you don’t offend me at all…I really appreciate your feedback and observations.
 * I appreciate feedback and insight from all who are willing to offer it. I agree…
   when it’s your own creation, its all too easy to overlook things.
 * Thank you! I’m sure I will, it just might take a little bit. Have a good one.
   🙂
 *  Thread Starter [master412160](https://wordpress.org/support/users/master412160/)
 * (@master412160)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/1-argument-that-needs-patching/#post-4997613)
 * Have you had any luck no this?
 *  Plugin Contributor [redsand](https://wordpress.org/support/users/redsand/)
 * (@redsand)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/1-argument-that-needs-patching/#post-4997618)
 * I applied a workaround so it shouldn’t show up anymore but I haven’t been able
   to figure out what exactly is causing it yet.
 *  Thread Starter [master412160](https://wordpress.org/support/users/master412160/)
 * (@master412160)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/1-argument-that-needs-patching/#post-4997619)
 * Is tis workaround present in the latest version?
 *  Plugin Contributor [redsand](https://wordpress.org/support/users/redsand/)
 * (@redsand)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/1-argument-that-needs-patching/#post-4997620)
 * Yes it is.
 *  Thread Starter [master412160](https://wordpress.org/support/users/master412160/)
 * (@master412160)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/1-argument-that-needs-patching/#post-4997623)
 * It still displays for me though…
 *  Plugin Contributor [redsand](https://wordpress.org/support/users/redsand/)
 * (@redsand)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/1-argument-that-needs-patching/#post-4997624)
 * Are you testing on 127.0.0.1?
 *  Thread Starter [master412160](https://wordpress.org/support/users/master412160/)
 * (@master412160)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/1-argument-that-needs-patching/#post-4997625)
 * Version 1.3 it says in my plugin list.
 *  Plugin Contributor [redsand](https://wordpress.org/support/users/redsand/)
 * (@redsand)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/1-argument-that-needs-patching/#post-4997626)
 * Yes, it would definitely say it’s in your plugin list. I was asking about the
   server you’re testing it on….is it an internal server (127.0.0.1, ie. your computer)
   or a live production website? (www.somewebsite.com)
 *  Thread Starter [master412160](https://wordpress.org/support/users/master412160/)
 * (@master412160)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/1-argument-that-needs-patching/#post-4997627)
 * live production website.

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/1-argument-that-needs-patching/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/1-argument-that-needs-patching/page/2/?output_format=md)

The topic ‘1 argument that needs patching’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-spamshield_08293a.svg)
 * [WP-SpamShield](https://wordpress.org/plugins/wp-spamshield/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-spamshield/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-spamshield/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-spamshield/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-spamshield/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-spamshield/reviews/)

 * 20 replies
 * 2 participants
 * Last reply from: [redsand](https://wordpress.org/support/users/redsand/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/1-argument-that-needs-patching/page/2/#post-4997632)
 * Status: resolved