Support » Plugin: Event Organiser » Displaying event date in site search results – fatal error

  • I am using echo eo_format_event_occurrence() in a theme loop to display the event date, works well for my custom event archives but not for the site search which gives a fatal error.

    Hope you can help!

    Fatal error:  Uncaught Exception: Error in formating DateTime object. Expected DateTime, but instead given boolean in ~/wp-content/plugins/event-organiser/includes/event-organiser-utility-functions.php:31
    Stack trace:
    #0 ~/wp-content/plugins/event-organiser/includes/event-organiser-utility-functions.php(164): eo_format_datetime(false, 'F j, Y')
    #1 ~/wp-content/themes/~/index.php(57): eo_format_event_occurrence()
    #2 ~/wp-includes/template-loader.php(77): include('/Users/admin/Do...')
    #3 ~/wp-blog-header.php(19): require_once('/Users/admin/Do...')
    #4 ~/index.php(17): require('/Users/admin/Do...')
    #5 {main}
      thrown in <b>~/wp-content/plugins/event-organiser/includes/event-organiser-utility-functions.php</b> on line <b>31</b><br>
    </p>
  • You must be logged in to reply to this topic.