Title: Undefined array key
Last modified: February 15, 2023

---

# Undefined array key

 *  Resolved [Daniel Przygoda](https://wordpress.org/support/users/przygoda/)
 * (@przygoda)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/undefined-array-key-17/)
 * Hello, I have a blog with a lot of pages. Under each post I have the following:
 * **Warning**: Undefined array key “viewed_cookie_policy” in **/var/www/web27885579/
   html/wp-content/plugins/advanced-ads/classes/ad_type_plain.php(167) : eval()’
   d code** on line **2**
 * My programming skills are very limited. And I don’t know what I did wrong.
   I 
   am happy if someone can help me.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fundefined-array-key-17%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [henningaa](https://wordpress.org/support/users/henningaa/)
 * (@henningaa)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/undefined-array-key-17/#post-16474927)
 * Hi Daniel,
 * Thanks for reaching out.
 * Can you please check if your ad code contains the `viewed_cookie_policy` function?
   I assume that this php function in your ad code is causing the error message.
 * You can also try disabling your ads one by one to find out which ad unit is causing
   the error message. Another way to check this quickly is to disable all ads in
   the frontend using the _Advanced Ads > Settings > Disable ads_ options.
 * Please reach out to me about your findings.
 * Best regards,
   Henning
 *  Thread Starter [Daniel Przygoda](https://wordpress.org/support/users/przygoda/)
 * (@przygoda)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/undefined-array-key-17/#post-16475002)
 * Great! Thank you Henning. You have led me on the right path.
 * The first thing I did was uncheck the PHP box, and then the error message was
   gone. Then I removed the text from the bottom area for display parameters. Now
   this area is empty.
 * I don’t know if I did something wrong, but now the page is clean again. The Google
   Ads work too. It seems that everything is now fine at my page. Many thanks for
   your help.
 * ![](https://i0.wp.com/www.linkpicture.com/q/advanced2.jpg?ssl=1)
 *  [henningaa](https://wordpress.org/support/users/henningaa/)
 * (@henningaa)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/undefined-array-key-17/#post-16476195)
 * Hi Daniel,
 * Thanks for the feedback and great to read your ads are working now.
 * If you have further questions regarding Advanced Ads, please don’t hesitate to
   reach out to me again.
 * Best regards,
   Henning

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Undefined array key’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [henningaa](https://wordpress.org/support/users/henningaa/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/undefined-array-key-17/#post-16476195)
 * Status: resolved