Skip Navigation

[Closed] 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 0 reply, has 1 voice.

Last updated by Minesh 2 months, 2 weeks 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/

#2807298

Christopher Amirian
Supporter

Languages: English (English )

Hi Minesh, is not available today. He will check the issue tomorrow

#2807388

Minesh
Supporter

Languages: English (English )

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

Thank you for sharing all those information.

However - I do not see any other user reported the same issue but I'll keep eye on this issue if any other reports the same. For now, I suggest you should keep using the fix you have that works for you.

#2807537

OK - I was just trying to be helpful. I just migrated another site and I've encountered the same issue. It's a shame that a simple patch can't make it into your code base because you haven't seen it anywhere else (it's a legit problem).

#2807558

Minesh
Supporter

Languages: English (English )

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

I understand that but I will require exact steps in order to reproduce the issue with content.

Can you please share site backup that I should use as well as exact steps I will have to follow that should lead me to see the issue.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

The topic ‘[Closed] Fatal Error in installer_theme_upgrade_check() Due to Missing Object Check’ is closed to new replies.