Title: Undefined array key &#8220;ticket_required&#8221;
Last modified: September 3, 2025

---

# Undefined array key “ticket_required”

 *  [witdesign72](https://wordpress.org/support/users/witdesign72/)
 * (@witdesign72)
 * [9 months, 1 week ago](https://wordpress.org/support/topic/undefined-array-key-ticket_required/)
 * Hi!
 * When we create a new event with bookings enabled we get a white screen with this
   error after publishing:
 * Warning: Undefined array key “ticket_required” in /var/www/XXX.se/public_html/
   wp-content/plugins/events-manager/classes/em-ticket.php on line 500
 * Warning: Cannot modify header information – headers already sent by (output started
   at /var/www/ba-trafikskola.se/public_html/wp-content/plugins/events-manager/classes/
   em-ticket.php:500) in /var/www/XXX.se/public_html/wp-admin/post.php on line 231
 * The event is created anyways but it seems a bit buggy since the slots avaliable
   resets to 10 or 0 if we edit the event and so on….So any ideas?? If we turn bookings
   to off it works fine.

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

 *  [joneiseman](https://wordpress.org/support/users/joneiseman/)
 * (@joneiseman)
 * [9 months, 1 week ago](https://wordpress.org/support/topic/undefined-array-key-ticket_required/#post-18626169)
 * I will report this to the plugin owner. For now, you can fix this by changing
   line 500 of wp-content/plugins/events-manager/classes/em-ticket.php from this:
 *     ```wp-block-code
               } elseif ( $post['ticket_required'] === 'default' && $this->ticket_parent ) {
       ```
   
 * To this:
 *     ```wp-block-code
               } elseif ( !empty($post['ticket_required']) && $post['ticket_required'] === 'default' && $this->ticket_parent ) {
       ```
   
 *  Thread Starter [witdesign72](https://wordpress.org/support/users/witdesign72/)
 * (@witdesign72)
 * [9 months, 1 week ago](https://wordpress.org/support/topic/undefined-array-key-ticket_required/#post-18626284)
 * Excellent! Works just fine now.
 * Thank you!!

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

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

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=3550347)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [witdesign72](https://wordpress.org/support/users/witdesign72/)
 * Last activity: [9 months, 1 week ago](https://wordpress.org/support/topic/undefined-array-key-ticket_required/#post-18626284)
 * Status: not resolved