Make sure $end is a Horde_Date object
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 28 Sep 2009 15:43:30 +0000 (11:43 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 28 Sep 2009 15:44:00 +0000 (11:44 -0400)
timeobjects/lib/Driver/Weatherdotcom.php

index 2c43ce9..9f3d2e1 100644 (file)
@@ -76,6 +76,8 @@ class TimeObjects_Driver_Weatherdotcom extends TimeObjects_Driver
         // range.
         $forecast_start = new Horde_Date(time());
         $forecast_end = new Horde_Date($forecast_start);
+        $end = new Horde_Date($end);
+
         // Today is day 1, so subtract a day
         $forecast_end->mday += $this->_params['days'] - 1;
         if ($end->compareDate($forecast_start) <= -1 ||