• Resolved MikkelCrunch

    (@mikkelcrunch)


    So, basically it is a deprecated error.

    This was in my console in the Admin on the Plugins List page:

    PHP Errors in Ajax Response query-monitor.js?ver=3.15.0:403 {key: 'b77656ccfaf69d994ebd43e69ec61d0a', type: 'deprecated', message: 'Use of "self" in callables is deprecated', file: 'files/plugins/better-wp-security/core/lib/class-itsec-lib-ip-tools.php', line: 200, …} component : "Plugin: better-wp-security" file : "files/plugins/better-wp-security/core/lib/class-itsec-lib-ip-tools.php" key : "b77656ccfaf69d994ebd43e69ec61d0a" line : 200 message : "Use of \"self\" in callables is deprecated" stack

    I changed the line from:

    return call_user_func( array( 'self', $bin2mask_method ), $bin_mask );

    to:

    return call_user_func( array( 'ITSEC_Lib_IP_Tools', $bin2mask_method ), $bin_mask );

    Now my Console is clean again.

    Thanks for your Plugin!

    Best Regards
    Mikke

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @mikkelcrunch, thank you for the information, and I’m thrilled you’ve resolved the deprecated error!

    Please share your Site Health Info here so I can include it in the internal report and so that we can try to replicate it on our test environments.

    Looking forward to your response.

    @mikkelcrunch, @shanedelierrr

    Just wanted to add that there are actually 3 call_user_func() calls in the better-wp-security/core/lib/class-itsec-lib-ip-tools.phpfile that will result in the same PHP 8.2 deprecation notice.

    Thread Starter MikkelCrunch

    (@mikkelcrunch)

    Thank you, @nipro,

    for pointing out the additional instances of call_user_func() in the ITSEC_Lib_IP_Tools class that are also affected by the PHP 8.2 deprecation notice. You’re absolutely right, and it’s crucial to address all occurrences to ensure compatibility with PHP 8.2.

    For each instance where call_user_func() uses 'self' as part of the callable array, we should replace 'self' with the explicit class name ITSEC_Lib_IP_Tools. This change aligns with the new PHP standards and should eliminate the deprecation notices.

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @mikkelcrunch @nlpro

    I appreciate the additional information! I’ll forward this to our development team so they can take a look at it. Rest assured, I’ll circle back here when I get their response.

    Thank you.

    Plugin Support Ben Meredith

    (@benmeredithgmailcom)

    Our team is working here to resolve any lingering deprecation notices, and you should see those in releases soon. I’m going to mark this post as “resolved” for now. Definitely follow up in a new post if you’re still seeing deprecation notices after the next release!

    According to the 9.3.1 Changelog:

    Bug Fix: PHP 8.2 deprecation warnings

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Query Monitor found an error and I fixed it – where can I report it?’ is closed to new replies.