• Resolved Thomas Barregren

    (@tbarregren)


    The backend of https://www.smoltek.com suffered a fatal error. The log contained the following error message:

    PHP Fatal error:  Uncaught TypeError: downloadlist\Transient::set_message(): Argument #1 ($message) must be of type string, null given, called in /sites/www.smoltek.com/files/wp-con
    tent/plugins/download-list-block-with-icons/classes/class-transient.php on line 155 and defined in /sites/www.smoltek.com/files/wp-content/plugins/download-list-block-with-icons/classes/class-transient.php:81
    Stack trace:
    #0 /sites/www.smoltek.com/files/wp-content/plugins/download-list-block-with-icons/classes/class-transient.php(155): downloadlist\Transient->set_message()
    #1 /sites/www.smoltek.com/files/wp-content/plugins/download-list-block-with-icons/classes/class-transients.php(152): downloadlist\Transient->display()
    #2 /sites/www.smoltek.com/files/wp-content/plugins/download-list-block-with-icons/inc/admin.php(562): downloadlist\Transients->check_transients()
    #3 /sites/www.smoltek.com/files/wp-includes/class-wp-hook.php(324): downloadlist_admin_notices()
    #4 /sites/www.smoltek.com/files/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #5 /sites/www.smoltek.com/files/wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 /sites/www.smoltek.com/files/wp-admin/admin-header.php(303): do_action()
    #7 /sites/www.smoltek.com/files/wp-admin/index.php(137): require_once('...')
    #8 {main}
      thrown in /sites/www.smoltek.com/files/wp-content/plugins/download-list-block-with-icons/classes/class-transient.php on line 81

    As a temporary solution, I have added an if-statement around lines 155-158 in the file download-list-block-with-icons/classes/class-transient.php:

    if ( $entry = get_transient( $this->get_name() ) && isset( $entry['message'] ) ) {
            $this->set_message( $entry['message'] );
            $this->set_type( $entry['type'] );
            $this->set_dismissible_days( $entry['dismissible_days'] );
            $this->set_action( $entry['action'] );
    }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Bug: downloadlist\Transient::set_type()’ is closed to new replies.