From f1a475221dfcae1ad5c7324d5e20c9f70c668937 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 11 Apr 2007 09:52:06 +0000 Subject: [PATCH] fix for bug #528: Calendar recurrence form throws devision by zero error --- calendar/inc/class.bocal.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.bocal.inc.php b/calendar/inc/class.bocal.inc.php index 515ecf3412..6de35994cc 100644 --- a/calendar/inc/class.bocal.inc.php +++ b/calendar/inc/class.bocal.inc.php @@ -741,7 +741,7 @@ class bocal $this->add_adjusted_event($events,$event,$search_date_ymd); continue; } - $freq = $event['recur_interval']; + $freq = $event['recur_interval'] ? $event['recur_interval'] : 1; $type = $event['recur_type']; switch($type) { @@ -1551,7 +1551,7 @@ class bocal $str_extra[] = lang('days repeated').': '.implode(', ',$repeat_days); } } - if($event['recur_interval']) + if($event['recur_interval'] > 1) { $str_extra[] = lang('Interval').': '.$event['recur_interval']; }