Skip to:
Content
Pages
Categories
Search
Top
Bottom

blacklist_keys are deprecated


  • webmasterfreya
    Participant

    @webmasterfreya

    Hi,

    WP 6.0
    Buddypress 10.3.0

    Getting these messages:
    AH01071: Got error ‘PHP message: PHP Deprecated: Functie get_option werd aangeroepen met een argument dat sinds versie 5.5.0 verouderd is!
    De “blacklist_keys” optie sleutel is hernoemd naar “disallowed_keys”. in /var/www/vhosts/freya.nl/httpdocs/wp-includes/functions.php on line 5663′,

    \wp-content\plugins\buddypress\bp-core\bp-core-moderation.php

    237 /** Blacklist ************************************************************
    */

    // Get the moderation keys.
    $disallowed = get_option( ‘disallowed_keys’ );

    // Support for WP < 5.5.
    if ( false === $disallowed ) {
    $disallowed = get_option( ‘blacklist_keys’ );
    }

    $disallowed = trim( $disallowed );

    // Bail if disallowed list is empty.
    if ( empty( $disallowed ) ) {
    return true;
    253 }

    If there are no “forbidden” words defined, the option_value for option_name = disallowed_keys is empty.
    Seems to me that $disallowed = get_option( ‘disallowed_keys’ ) will be false.
    However that does not mean that the WP version is < 5.5 !

    So maybe it’s better to bail just after
    // Get the moderation keys.
    $disallowed = get_option( ‘disallowed_keys’ );

  • You must be logged in to reply to this topic.
Skip to toolbar