Title: toIso8601String() error
Last modified: September 26, 2016

---

# toIso8601String() error

 *  Resolved [avir673](https://wordpress.org/support/users/avir673/)
 * (@avir673)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/toiso8601string-error/)
 * 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)

 *  [blatteroon](https://wordpress.org/support/users/blatteroon/)
 * (@blatteroon)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/toiso8601string-error/#post-8222501)
 * 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.
 *  [blatteroon](https://wordpress.org/support/users/blatteroon/)
 * (@blatteroon)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/toiso8601string-error/#post-8222543)
 * 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](https://wordpress.org/support/users/pderksen/)
 * (@pderksen)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/toiso8601string-error/#post-8223133)
 * [@avir673](https://wordpress.org/support/users/avir673/) [@blatteroon](https://wordpress.org/support/users/blatteroon/)
   Thanks for letting us know and submitting the code.
 * Just pushed out a fix with the 3.1.6 update.
 *  Thread Starter [avir673](https://wordpress.org/support/users/avir673/)
 * (@avir673)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/toiso8601string-error/#post-8224740)
 * Works great now. Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘toIso8601String() error’ is closed to new replies.

 * ![](https://ps.w.org/google-calendar-events/assets/icon-256x256.png?rev=1263960)
 * [Simple Calendar - Google Calendar Plugin](https://wordpress.org/plugins/google-calendar-events/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-calendar-events/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-calendar-events/)
 * [Active Topics](https://wordpress.org/support/plugin/google-calendar-events/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-calendar-events/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-calendar-events/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [avir673](https://wordpress.org/support/users/avir673/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/toiso8601string-error/#post-8224740)
 * Status: resolved