Skip Navigation

[Waiting for user feedback] Fatal Error in installer_theme_upgrade_check() Due to Missing Object Check

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 1 reply, has 1 voice.

Last updated by Minesh 1 day, 12 hours ago.

Assisted by: Minesh.

Author
Posts
#2806634

Please see https://toolset.com/forums/topic/intermittent-critical-error-with-types/, this is something we have encountered multiple times before.

We're encountering a recurring fatal error caused by the installer_theme_upgrade_check() method in the file:
/types/vendor/otgs/installer/includes/class-installer-theme.php

The issue occurs when get_site_transient('update_themes') returns false. The method assumes the $the_value parameter is always an object and tries to access the response property, which results in:

PHP Fatal error: Uncaught Error: Attempt to modify property "response" on bool

To resolve the issue, we manually patched the function by adding a type check at the top of the method:

public function installer_theme_upgrade_check( $the_value ) {
    // Ensure $the_value is an object before proceeding
    if ( !is_object( $the_value ) ) {
        return $the_value;
    }

    // Existing logic continues here...
}

This small change prevents fatal errors and ensures compatibility when other plugins or custom code short-circuit the theme update transient and return a boolean instead of an object.

Please consider including this fix in your next plugin update, as it's a safe and minimal safeguard that would improve overall plugin robustness.

#2806689

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please tell me what theme you are using and what are the exact steps I will have to follow in order to reproduce the issue.

In addition to that - Could you please send me debug information that will help us to investigate your issue.
=> https://toolset.com/faq/provide-debug-information-faster-support/