• Resolved mkoscher

    (@mkoscher)


    Hi,
    after the last update i get a fatal error on the whole site.
    Can you please help me, how to fix this.

    Many thanks in advance

    PHP Fatal error: Uncaught TypeError: CryptX\CryptX::processWidgetContent(): Argument #1 ($instance) must be of type array, false given, called in wp-includes/class-wp-hook.php on line 341 and defined in wp-content/plugins/cryptx/classes/CryptX.php:1107
    Stack trace:
    0 wp-includes/class-wp-hook.php(341): CryptX\CryptX->processWidgetContent()
    1 wp-includes/plugin.php(205): WP_Hook->apply_filters()
    2 wp-includes/class-wp-widget.php(383): apply_filters()
    3 wp-includes/widgets.php(845): WP_Widget->display_callback()

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ralf Weber

    (@d3395)

    Hi @mkoscher
    thanks for providing the stack trace.

    Is it possible, that you edit the code to see, if this solves it?

    …/wp-content/plugins/cryptx/classes/CryptX.php
    replace the lines 1107 – 1108…

        public function processWidgetContent(array $instance, $widget, $args): array
    {

    with…

        public function processWidgetContent(array|false $instance, $widget, $args): array|false
    {
    if ($instance === false) {
    return false;
    }

    Unfortunately, I couldn’t reproduce the error on my test system, but the change didn’t cause any new problems.

    If this resolves the issue, I will release a fixed version as soon as possible.

    Thread Starter mkoscher

    (@mkoscher)

    Thanks for your help,

    the patch works, even without the if.

    Plugin Author Ralf Weber

    (@d3395)

    Version 4.0.10 with the fix is released.

    The If statement is there so that the entire method doesn’t have to run if no widget data (false) has been passed.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.