• Resolved avir673

    (@avir673)


    Hi
    I updated the plugin from 3.0.12 to 3.1.5 and got an error on my calendar which was previously working great.
    The error: Fatal error: Call to a member function toIso8601String() on a non-object… referring to line 688 in includes/events/event-builder.php: $end_iso = $end->toIso8601String()
    I guess it has to do with events that don’t show an end date (one day events). I commented out that line which made everything work again, but I don’t want to leave it that way. Any idea how I can work around this problem?
    Thanks,

Viewing 4 replies - 1 through 4 (of 4 total)
  • Same here. WordPress 4.6.1, just upgraded SimpleCalendar to 3.1.5, and getting the same error message:

    [26-Sep-2016 14:52:15 UTC] PHP Fatal error: Call to a member function toIso8601String() on a non-object in /home/my-site-name/public_html/wp-content/plugins/google-calendar-events/includes/events/event-builder.php on line 688

    My calendars are broken – next/prev buttons not working, label messed up. I’ll try commenting out this line as you did and see if it helps, but of course it’s not a great resolution.

    I put a null-test instead of just commenting out. With this line no longer erroring, all my other calendar problems cleared up as well.

    //$end_iso = $end->toIso8601String();
    $end_iso = ! is_null( $end ) ? $end->toIso8601String() : null;

    Plugin Contributor Phil Derksen

    (@pderksen)

    @avir673 @blatteroon Thanks for letting us know and submitting the code.

    Just pushed out a fix with the 3.1.6 update.

    Thread Starter avir673

    (@avir673)

    Works great now. Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘toIso8601String() error’ is closed to new replies.