Jump to content

Events - Error: Call to a member function format() on null


Go to solution Solved by Marc,

Recommended Posts

Posted
Error: Call to a member function format() on null (0)
#0 /var/www/html/ips-themes/system/Patterns/ActiveRecord.php(335): IPS\calendar\_Event->get__happening()
#1 /var/www/html/ips-themes/system/Theme/Theme.php(4620) : eval()'d code(36): IPS\Patterns\_ActiveRecord->__get()
#2 /var/www/html/ips-themes/system/Theme/Dev/Template.php(171): IPS\Theme\theme_calendar_front_view_coverPhotoOverlay()
#3 /var/www/html/ips-themes/applications/calendar/sources/Event/Event.php(2309): IPS\Theme\Dev\_Template->__call()
#4 /var/www/html/ips-themes/applications/calendar/modules/front/calendar/event.php(166): IPS\calendar\_Event->coverPhoto()
#5 /var/www/html/ips-themes/system/Dispatcher/Controller.php(118): IPS\calendar\modules\front\calendar\_event->manage()
#6 /var/www/html/ips-themes/system/Content/Controller.php(50): IPS\Dispatcher\_Controller->execute()
#7 /var/www/html/ips-themes/applications/calendar/modules/front/calendar/event.php(64): IPS\Content\_Controller->execute()
#8 /var/www/html/ips-themes/system/Dispatcher/Dispatcher.php(153): IPS\calendar\modules\front\calendar\_event->execute()
#9 /var/www/html/ips-themes/index.php(13): IPS\_Dispatcher->run()
#10 {main}

To repro:

  • Create an event that repeats every 6 years, with a start date in 2019
  • Try to view that event

This is because Event::nextOccurrence only searches within a couple of years, and returns null if it goes out of range, but get__happening doesn't handle null.

Posted

Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release.

 

  • 3 weeks later...
  • Solution
Posted

Just a quick note to let you know this has been resolved in the latest 4.7.4 release, which went out a short time ago. If you are still experiencing this issue after upgrading to that release, please let us know.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...