From 94553bd518124a2f1d9347f618077e313b1dcb5c Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Fri, 25 Sep 2009 11:27:14 -0400 Subject: [PATCH] can't clone NULL --- kronolith/lib/Kronolith.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kronolith/lib/Kronolith.php b/kronolith/lib/Kronolith.php index 063af7536..a27350151 100644 --- a/kronolith/lib/Kronolith.php +++ b/kronolith/lib/Kronolith.php @@ -490,7 +490,11 @@ class Kronolith /* Work out what day it ends on. */ if ($event->end->compareDateTime($endDate) > 0) { /* Ends after the end of the period. */ - $eventEnd = clone $endDate; + if (is_object($endDate)) { + $eventEnd = clone $endDate; + } else { + $eventEnd = $endDate; + } } else { /* If the event doesn't end at 12am set the end date to the * current end date. If it ends at 12am and does not end at -- 2.11.0