Uncaught TypeError: Cannot access offset of type string on string
-
Hi,
I am using the version 1.2.0 Email Template Customizer for WooCommerce and have run into an issue. The site works fine with mySQL 5.7. I have been doing testing with mySQL 8 and I get the following error:
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in \wp-content\plugins\email-template-customizer-for-woo\includes\email-trigger.php:469
The site is completely down with the above error. If I deactive the plugin, and site is back up working. The environment is:
WP 6.3.1
Theme: OceanWP 3.5.0
PHP 8.1.23
mySQL 8.0.16The site that works with mySQL 5.7 has:
WP 6.2.2
Theme: OceanWP 3.4.7
PHP 7.4.33.4
mySQL 5.7.42-46-log(I understand that the Template Customizer has only been tested through WP 6.2.)
Looking in the file email-trigger.php:
public function minify_email_content( $args ) { $message = $args['message']; <<<--Line 469 $args['message'] = Utils::minify_html( $message ); return $args; }Error on line 469:
“Fatal error: Uncaught TypeError: Cannot access offset of type string on string”I commented out the 2 lines below so that the function just returns what was sent to it, and the site works fine now:
public function minify_email_content( $args ) { // $message = $args['message']; // $args['message'] = Utils::minify_html( $message ); return $args; }I don’t know enough PHP to understand what is wrong, but I know what minifying means.
I was wondering if there is some other compatibility issue going on here, or if this is a bug int he Template Customizer that needs an update.
The topic ‘Uncaught TypeError: Cannot access offset of type string on string’ is closed to new replies.