Skip to:
Content
Pages
Categories
Search
Top
Bottom

blacklist_keys in bbpress functions.php


  • Mike Witt
    Participant

    @mike80222

    I continue to get a lot of PHP Deprecated notices for blacklist_keys. I really don’t know where they’re coming from, but I notice that in bbpress/includes/common/functions.php, in the function bbp_check_for_moderation, there’s this:

    $option_name = ‘blacklist_keys’;

    I wonder if that should be changed to ‘disallowed_keys’

Viewing 11 replies - 1 through 11 (of 11 total)

  • Robin W
    Moderator

    @robin-w

    basically yes it should, there is a request for this.


    Mike Witt
    Participant

    @mike80222

    Thanks Robin!


    Robin W
    Moderator

    @robin-w

    I will take another look at this – I’m on holiday at the moment, to see if there are any quick fixes, if I haven’t responded in a week, then post here again to remind me.


    Mike Witt
    Participant

    @mike80222

    For what it’s worth, I can’t find a way to make the PHP Deprecated notices happen by doing any bbPress function I can think of. (What I can think of it is just to make posts and replies 🙂 ) If the notices are coming from bbPress (and maybe they’re not) I don’t know what sort of action might trigger them.


    Robin W
    Moderator

    @robin-w

    yes, it is bbpress and is a check when a topic/reply is made or edited.

    and no there is no easy way to avoid this, it really needs changing in the core bbpress product as you say to disallowed.

    There is a way to skip this check, and there are hooks that could be used to re-apply it, but it is a ton of work to do, and beyond free help.

    Unless it is really really bugging you, I think we just need to live with it.


    Mike Witt
    Participant

    @mike80222

    No, it’s not a big deal. Just a deprecated notice. Is there a ticket for it (just so that it might eventually get worked on?)


    Robin W
    Moderator

    @robin-w

    I was sure it had a ticket, but can’t find, so I’ve created a new one.

    https://bbpress.trac.wordpress.org/ticket/3538

    Given that you are seeing this, can you change the wording in the bbpress file and see if the error goes away – it should cause no issues, it would just get overwritten by an update. Given that a new version is unlikely to be released anytime soon, it should stop them appearing for you, and would confirm that this is the fix.


    Mike Witt
    Participant

    @mike80222

    That’s what I was planning to do, but I can’t replicate the problem. When I just make a couple of posts and replies, I don’t get the php notice. That’s why I was thinking maybe it wasn’t bbPress. There must be something special I need to do, to invoke the “blacklist” thing? It happens every once in a while. But I can’t find an action that causes it to happen. I gather that you don’t see it happening, right?

    [10-Mar-2023 04:55:26 UTC] PHP Deprecated: Function get_option was called with an argument that is <strong>deprecated</strong> since version 5.5.0! The "blacklist_keys" option key has been renamed to "disallowed_keys". in .../public_html/wp-includes/functions.php on line 5667


    Robin W
    Moderator

    @robin-w

    In suspect if you are posting as you (eg say a keymaster) then it won’t do the check, can’t say for sure without delving into code, but try as a participant


    Mike Witt
    Participant

    @mike80222

    Holy cow, I can’t believe I didn’t think of that!

    Yes, you’re right. When I post anything as a regular user I get the notice. And changing that line in bbpress/includes/common/functions.php does appear to make it go away. I commented on the ticket just to say that I tried it.

    Thanks!


    Robin W
    Moderator

    @robin-w

    great – love it when an idea proves right !!

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
Skip to toolbar