• Resolved devsc2768

    (@devsc2768)


    We have received a fatal error when logging in after the last Ninjafirewall update 4.5.4.

    There seems to be a conflict between NinjaFirewall notifications and Better Notifications for WP 1.9 (updated September 6).

    Log error:

    2022/09/08 00:10:36 [error] 99753#99753: *234030 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function str_contains() in /www/xxx/public/wp-content/plugins/bnfw/bnfw.php:249
    Stack trace:
    #0 /www/xxx/public/wp-includes/class-wp-hook.php(287): BNFW->bnfw_update_email_changing_subject(Array)
    #1 /www/xxx/public/wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array)
    #2 /www/xxx/public/wp-includes/pluggable.php(182): apply_filters('wp_mail', Array)
    #3 /www/xxx/public/wp-content/plugins/ninjafirewall/lib/utils.php(1612): wp_mail('[email protected]...', '[NinjaFirewall]...', 'Someone just lo...', '', '')
    #4 /www/xxx/public/wp-content/plugins/ninjafirewall/lib/utils.php(796): nfw_mail('[NinjaFirewall]...', 'Someone just lo...', 'php')
    #5 /www/xxx/public/wp-content/plugins/ninjafirewall/ninjafirewall.php(600): nfw_send_loginemail('XXX', ' (administrator...')
    #6 /www/xxx/public/wp-includes/class-wp-hook.php(287): nfw_login_hook('D1@y84588', Ob" while reading response header from upstream, client: 27.33.42.149, server: xxx.com, request: "POST /wp-login.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php7.4-fpm-xxx.sock:", host: "xxx.com:45692", referrer: "https://xxx.com/wp-login.php"

    From debugging in staging, the fatal error appears to occur when Better Notifications for WP is enabled. If I disable all notifications in NinjaFirewall and then enable Better Notifications for WP the fatal error is not triggered.

    Thanks

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter devsc2768

    (@devsc2768)

    I have discovered that the issue is related to Better Notifications for WP 1.9 and not NinjaFirewall and impacts all notifications. I will follow up with their developers.

    Plugin Author nintechnet

    (@nintechnet)

    undefined function str_contains

    It looks like the Better Notifications for WP plugin makes use of the str_contains function. However, this function is only available in PHP 8. You’re probably running PHP 7x.

    Thread Starter devsc2768

    (@devsc2768)

    Thanks for looking into this. I can confirm that it works with PHP 7.4 and WP 6.0.2 so it looks like it is related to older versions of WordPress below 6.

    I am following this up directly with the developer. Thanks again for the speedy reply.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal error on login after 4.5.4 update’ is closed to new replies.