When updating to the newest PHP version (8.3.4), I get trouble with an Elementor module in the PHP file. I’m not experienced with PHP so I understand partly what the problem is but not how to fix it.
Warning: Undefined array key “hotspot_offset_x” in
/var/www/vhosts/happy-anders.nl/httpdocs/wp-content/plugins/elementor-pro/modules/hotspot/widgets/hotspot.php
on line 1012Warning: Trying to access array offset on null in
/var/www/vhosts/happy-anders.nl/httpdocs/wp-content/plugins/elementor-pro/modules/hotspot/widgets/hotspot.php
on line 1012Warning: Undefined array key “hotspot_offset_y” in
/var/www/vhosts/happy-anders.nl/httpdocs/wp-content/plugins/elementor-pro/modules/hotspot/widgets/hotspot.php
on line 1013Warning: Trying to access array offset on null in
/var/www/vhosts/happy-anders.nl/httpdocs/wp-content/plugins/elementor-pro/modules/hotspot/widgets/hotspot.php
on line 1013`
// Hotspot
foreach ( $settings['hotspot'] as $key => $hotspot ) :
$is_circle = ! $hotspot['hotspot_label'] && ! $hotspot['hotspot_icon']['value'];
$is_only_icon = ! $hotspot['hotspot_label'] && $hotspot['hotspot_icon']['value'];
$hotspot_position_x = '%' === $hotspot['hotspot_offset_x']['unit'] ? 'e-**line 1012** hotspot--position-' . $hotspot['hotspot_horizontal'] : '';
$hotspot_position_y = '%' === $hotspot['hotspot_offset_y']['unit'] ? 'e-**line 1013** hotspot--position-' . $hotspot['hotspot_vertical'] : '';
$is_hotspot_link = ! empty( $hotspot['hotspot_link']['url'] );
$hotspot_element_tag = $is_hotspot_link ? 'a' : 'div';
I tried to go back to the outdated version of PHP, but I know that’s not a good solution.