[FIXED] Fatal error on PHP8
-
My functions stopped evaluating after switching to PHP8, throwing:
PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in?/wp-content/plugins/calculate-values-with-shortcodes/calculate-values-shortcodes.php:26
Here’s the fix. Go to Plugins -> Plugin File Editor -> Select Calculate Values in the drop down.
Edit line 26 to read:
if (is_array($atts) && $atts["style"] == 'usd'){
Edit line 31 to read:
else if (is_array($atts) && $atts["style"] == 'percent'){
- The topic ‘[FIXED] Fatal error on PHP8’ is closed to new replies.