PHP 8.1 Fatal error: Array and string offset access syntax with curly braces
-
It seems that this plugin case Fatal error causes an error in PHP8.1. Please correct it as soon as possible.
Fatal error: Array and string offset access syntax with curly braces is no longer supported in /wp-content/plugins/ads-for-wp/admin/inc/Google/Utils.php on line 67
After I changed the following code in line 67, (replace curly bracket with box bracket)
$ordinalValue = ord($strdomain{$ret}domain);
to
$ordinalValue = ord($strdomain[$ret]domain);
After that changes this WordPress backend the Fatal error message disappeared. But I do not know how much is it correct? (I’m not a PHP expert, just found it Googling).
- The topic ‘PHP 8.1 Fatal error: Array and string offset access syntax with curly braces’ is closed to new replies.