Support » Plugins and Hacks » WP-SpamShield Anti-Spam - All-in-One Spam Protection » [Resolved] 1 argument that needs patching

[Resolved] 1 argument that needs patching

Viewing 15 replies - 1 through 15 (of 20 total)
  • 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:
    … and User Roles and Capabilities is:

    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

    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?

    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.

    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.

    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.

    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. 🙂

    Have you had any luck no this?

    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.

    Is tis workaround present in the latest version?

    Yes it is.

    It still displays for me though…

    Are you testing on

    Version 1.3 it says in my plugin list.

    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 (, ie. your computer) or a live production website? (www.somewebsite.com)

    live production website.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘[Resolved] 1 argument that needs patching’ is closed to new replies.
Skip to toolbar