fix Call to a member function format() on null caused by 9810077eab

This commit is contained in:
Ralf Becker 2017-03-31 14:05:21 +02:00
parent d2d7040721
commit af6fe077dd

View File

@ -535,6 +535,10 @@ class calendar_rrule implements Iterator
*/
public function valid($use_just_date=false)
{
if (!$this->enddate)
{
return true;
}
if ($use_just_date)
{
return $this->current->format('Ymd') <= $this->enddate->format('Ymd');