WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. carloshf
    Member
    Posted 1 year 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
    Carlos

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 1 year 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) ) {
    above
    foreach( $this->get_bookings()->get_pending_bookings()->bookings as $EM_Booking ){
    and this
    }
    above
    return apply_filters('em_ticket_get_pending_spaces', $spaces, $this);

  3. seannittner
    Member
    Posted 1 year ago #

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

  4. agelonwl
    Member
    Posted 1 year ago #

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

  5. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    yes, will fix this

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic