Slight issue with PHP 8.0: error on usage of curly braces
-
I’ve been updating many of my sites to PHP 8.0 to see what breaks, and it looks like Google Analyticator is unfortunately among the ‘fail’ crowd:
PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in <WP-PATH>/wp-content/plugins/google-analyticator/google-api-php-client/src/service/Google_Utils.php on line 58
This is actually very easy to fix, just change line 58 from
$ordinalValue = ord($str{$ret});
to
$ordinalValue = ord($str[$ret]);
That’s it!
- The topic ‘Slight issue with PHP 8.0: error on usage of curly braces’ is closed to new replies.