Undefined array key “conditions”
-
Hello, i use your plugin on the website of a customer.
At the moment i get the following error:
Undefined array key “conditions”, referer: https://www.civieletechniek.net/wp-admin/edit.php?post_type=advanced_ads. This happens because there is no check on the array key at class-meta-box.php:275 and line 276;For now i fixed it by manually changing the code to this:
$display_conditions = isset( $ad_options[‘conditions’] ) && is_array( $ad_options[‘conditions’] ) ? $ad_options[‘conditions’] : []; // default value for older version is
""(empty string)
$visitor_conditions = isset( $ad_options[‘visitors’] ) && is_array( $ad_options[‘visitors’] ) ? $ad_options[‘visitors’] : []; // default value for older version is""(empty string)(Adding the ‘isset(….) &&’ part) But that will be overwritten in a future update ofcourse.
The error occurs when i try to create a new ‘image ad’. When selecting the ‘image ad’, at the ‘Ad parameter’ block an infinited loading circle appears.
Can you make a fix for this error? or do you need additional information from me?
I am currently on wordpress version 6.5.5 and php 8.1.26kind regards,
Jelle de Ruiter
The topic ‘Undefined array key “conditions”’ is closed to new replies.