• Resolved Kurt333

    (@kurt333)


    After updating the WPCode plugin to its latest version, it throws the following fatal error:
    [21-Feb-2023 14:34:27 UTC] PHP Fatal error: Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, array given in /home/MYSITE/public_html/wp-content/plugins/insert-headers-and-footers/includes/class-wpcode-error.php:90

    When I go down from PHP 8.1 to 7.3 it works ok (so for now I’ve done that though I would prefer to run on 8.1).

    Any suggestions?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @kurt333,

    Thanks for reporting this, we are going to include a check to prevent that from happening in the next release.

    That code should only run when a snippet throws an error so a quick fix should be to make sure none of the snippets you are using are generating notices/errors.

    Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @kurt333,

    Please update to version 2.0.8.1 that addresses the issue reported.

    Thread Starter Kurt333

    (@kurt333)

    Many thanks for the quick response and resolution Mircea. It all works fine again now in PHP 8.1 ??

    In terms of your initial response, I did turn on error logging for the snippets in the WPCode settings, but the error log stayed empty. So I assume my snippets were ok.

    Many thanks again.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Version 2.0.8 throws fatal error in PHP 8.1’ is closed to new replies.