Title: Undefined array key &#8220;conditions&#8221;
Last modified: July 3, 2024

---

# Undefined array key “conditions”

 *  Resolved [jellecase](https://wordpress.org/support/users/jellecase/)
 * (@jellecase)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/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](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.26
 * kind regards,
 * Jelle de Ruiter

Viewing 1 replies (of 1 total)

 *  [henningaa](https://wordpress.org/support/users/henningaa/)
 * (@henningaa)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/undefined-array-key-conditions/#post-17879026)
 * Hi Jelle 
 * Thanks for sending in this detailed error report.
 * The dev team is already looking into this issue. I’ll let you know once the fixed
   version is available.
   If you need the feature in question, I recommend reverting
   to the [last version of Advanced Ads](https://wordpress.org/plugins/advanced-ads/advanced/):
   1.52.3
 * Best regards,
   Henning

Viewing 1 replies (of 1 total)

The topic ‘Undefined array key “conditions”’ is closed to new replies.

 * ![](https://ps.w.org/advanced-ads/assets/icon-256x256.gif?rev=2773443)
 * [Advanced Ads – Ad Manager & AdSense](https://wordpress.org/plugins/advanced-ads/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-ads/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-ads/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-ads/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-ads/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-ads/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [henningaa](https://wordpress.org/support/users/henningaa/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/undefined-array-key-conditions/#post-17879026)
 * Status: resolved