Events Manager
[resolved] invalid argument supplied for foreach() (5 posts)

  1. carloshf
    Posted 3 years ago #

    Hi, I have upgrade events-manager plugin to last version and the system shows a warning message at the event single page in "booking" zone:
    Warning: Invalid argument supplied for foreach() in /wp-content/plugins/events-manager/classes/em-ticket.php on line 236.

    Anybody knows how can i resolve this error?
    Thank you all


  2. agelonwl
    Posted 3 years ago #

    this issue has been reported already; can you give details on your EM settings/options before upgrading? Also, can you try this steps temporarily:

    1. go to wp-content/plugins/events-manager/classes/em-ticket.php
    2. go to line 236 or function get_pending_spaces()
    3. add this snippet
    if ( is_array($this->get_bookings()->get_pending_bookings()->bookings) ) {
    foreach( $this->get_bookings()->get_pending_bookings()->bookings as $EM_Booking ){
    and this
    return apply_filters('em_ticket_get_pending_spaces', $spaces, $this);

  3. seannittner
    Posted 3 years ago #

    This temporary fix worked on my site. Any chance it will be cleaned up as of 5.3.4?

  4. agelonwl
    Posted 3 years ago #

    Can you give us details on your setup/settings before updating? e.g. single ticket?

  5. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    yes, will fix this

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic