Uncaught TypeError: Cannot access offset of type string

Hi there,

After updating to the latest version, I get this error when trying to access my wordpress instance:

[13-Dec-2022 14:54:26 UTC] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /wp-content/plugins/mainwp/class/class-mainwp-api-handler.php:72
Stack trace:
#0 /wp-content/plugins/mainwp/class/class-mainwp-system-handler.php(740): MainWP\Dashboard\MainWP_API_Handler::check_exts_upgrade()
#1 /wp-content/plugins/mainwp/class/class-mainwp-system-handler.php(769): MainWP\Dashboard\MainWP_System_Handler->check_upgrade()
#2 /wp-includes/class-wp-hook.php(310): MainWP\Dashboard\MainWP_System_Handler->pre_check_update_custom(Object(stdClass))
#3 /wp-includes/plugin.php(205): WP_Hook->apply_filters(Object(stdClass), Array)
#4 /wp-includes/option.php(2018): apply_filters('pre_set_site_tr...', Object(stdClass), 'update_plugins')
#5 /wp-includes/update.php(391): set_site_transient('update_plugins', Object(stdClass))
#6 /wp-includes/update.php(1020): wp_update_plugins()
#7 /wp-includes/class-wp-hook.php(308): _maybe_update_plugins('')
#8 /wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#9 /wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#10 /wp-admin/admin.php(175): do_action('admin_init')
#11 {main}
  thrown in /wp-content/plugins/mainwp/class/class-mainwp-api-handler.php on line 72

Is this a bug and how can I fix it? Thanks!

1 Like

Hey @Zoker

Thank you for reporting this to us.

It has already been addressed, and the fix will be in a minor release that’s coming out soon.

You can find the pre-release, which includes the fix, at this link: Dropbox - mainwp.zip - Simplify your life

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.