PHP Fatal error: Uncaught TypeError: Unsupported operand types
-
Hello everyone, we are using the plugin on our website running on WordPress 6.3.1 and PHP 8.1.2 and it is triggering the following error:
PHP Fatal error: Uncaught TypeError: Unsupported operand types: string - string in (…)/wp-content/plugins/mega-addons-for-visual-composer/render/infobox.php:67
We identified the problem lies on this piece of line 67:
line-height: <?php esc_attr($icon_height - $border_width); ?>px;
A possible fix would be casting the variables to int:
line-height: <?php esc_attr((int)$icon_height - (int)$border_width); ?>px;
This was enough for it to work on our website but there may be more occurrences out there in the code.
Thanks,
Marcus
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘PHP Fatal error: Uncaught TypeError: Unsupported operand types’ is closed to new replies.