Skip to content
This repository was archived by the owner on Apr 2, 2019. It is now read-only.
This repository was archived by the owner on Apr 2, 2019. It is now read-only.

No end date causes site crash #49

Description

@diegovogel

I have a site with dozens of events on it (shows for a musician) and most have no end date, only a start date. This site works perfectly fine on a live server but I downloaded it today to make some changes on my local server and the site crashed with error: "Undefined index: end". This was highlighted in eventsProcessor.php:
image

On one hand this makes sense, it's looking for an event end date and none of my events have that. On the other hand, I have no problems on my live server. Any ideas why?

Perhaps a check could be added to eventsProcessor.php to only add the end date to the event object if the end date exists. I tried this out and it works great:

if ( isset( $event['end'] ) ) {
    $carbonEvent['end'] = Carbon::parse( $event['end'] );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions