• Resolved Kimberly

    (@kyber3000)


    Hello WordPress automatically updated this plug in and it caused a critical error so I have deactivated it for now. Is there a way I can use this without this issue occurring?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Cameron Jones

    (@cameronjonesweb)

    Hi @kyber3000,

    Sorry to hear that you are encountering issues. Are you able to share your error log so we can try and find the cause of the problem?

    Thanks

    I experienced the issue as well. Here’s the error message from it.

    PHP version: 8.1.2

    WordPress version: 6.2

    Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method Ko_Fi::maybe_display_floating_button() cannot be called statically in /var/www/(domain)/html/wp-includes/class-wp-hook.php:308
    Stack trace:
    0 /var/www/(domain)/html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    1 /var/www/(domain)/html/wp-includes/plugin.php(517): WP_Hook->do_action()
    2 /var/www/(domain)/html/wp-includes/general-template.php(3049): do_action()
    3 /var/www/(domain)/html/wp-content/themes/kadence/header.php(24): wp_head()
    4 /var/www/(domain)/html/wp-includes/template.php(783): require_once('…')
    5 /var/www/(domain)/html/wp-includes/template.php(718): load_template()
    6 /var/www/(domain)/html/wp-includes/general-template.php(48): locate_template()
    7 /var/www/(domain)/html/wp-content/themes/kadence/page.php(14): get_header()
    8 /var/www/(domain)/html/wp-includes/template-loader.php(106): include('…')
    9 /var/www/(domain)/html/wp-blog-header.php(19): require_once('…')
    10 /var/www/(domain)/html/index.php(17): require('…')
    11 {main}
    thrown in /var/www/(domain)/html/wp-includes/class-wp-hook.php on line 308

    More info about the issue:

    https://php.watch/versions/8.0/non-static-static-call-fatal-error

    I was able to fix this issue on our end by changing the method declaration from public function maybe_display_floating_button() to public static function maybe_display_floating_button(). (Ko_fi.php, line 262)

    Plugin Author Cameron Jones

    (@cameronjonesweb)

    Thank you @bennycopter for the error log.

    This has now been patched in version 1.3.1

    Morphed into a slightly different error withe the floating button display

    Warning: Undefined array key “coffee_floating_button_display” in?/home/######/public_html/######/wp-content/plugins/ko-fi-button/Ko_fi.phpon line?265

    Changed line 265 to

    $settings = !empty(self::$options[‘coffee_floating_button_display’])?self::$options[‘coffee_floating_button_display’]:false;

    Thread Starter Kimberly

    (@kyber3000)

    UPDATE: I am late to respond but wanted to provide an update that everything has been working as normal and without issues, thank you for fixing so soon.

    • This reply was modified 1 year, 7 months ago by Kimberly.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Latest update caused a critical error’ is closed to new replies.