Envato Market plugin causes critical error on PHP8


The Envato Market plugin caused a critical error on my site when I updated it to PHP 8 (7.4 is no longer recommended and I needed to switch). When I did. The plugin caused a critical error. I had to deactivate the plugin to fix the issue. The plugin is on the latest version 2.0.8. See the errors below.

Error Details
An error of type E_ERROR was caused in line 310 of the file /var/www/wp-content/plugins/envato-market/inc/class-envato-market.php. Error message: Uncaught TypeError: Cannot access offset of type string on string in /var/www/wp-content/plugins/envato-market/inc/class-envato-market.php:310
Stack trace:
#0 /var/www/wp-content/plugins/envato-market/inc/admin/class-envato-market-admin.php(292): Envato_Market->set_option('installed_versi...', '2.0.8')
#1 /var/www/wp-includes/class-wp-hook.php(308): Envato_Market_Admin->maybe_delete_transients('')
#2 /var/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#3 /var/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#4 /var/www/wp-settings.php(617): do_action('init')
#5 /var/www/wp-config.php(82): require_once('/var/www/wp-set...')
#6 /var/www/wp-load.php(50): require_once('/var/www/wp-con...')
#7 /var/www/wp-admin/admin.php(34): require_once('/var/www/wp-loa...')
#8 /var/www/wp-admin/index.php(10): require_once('/var/www/wp-adm...')
#9 {main}

Thank you

Hi @th3gman!

Unfortunately, this one seems a bit tricky. The plugin itself works fine on PHP 8. Your specific error seems to suggest that the plugin’s settings are corrupted, but it could be something else.

Would you mind sending an email to extensions@envato.com with all the same information from your post? That should get you directly in touch with the plugin’s developers.