Fix method call.
authorJan Schneider <jan@horde.org>
Mon, 18 Oct 2010 23:27:13 +0000 (01:27 +0200)
committerJan Schneider <jan@horde.org>
Mon, 18 Oct 2010 23:35:10 +0000 (01:35 +0200)
Reset attributes and components.

framework/Icalendar/lib/Horde/Icalendar.php

index b5203e7..b61a8e2 100644 (file)
@@ -546,6 +546,8 @@ class Horde_Icalendar
      */
     public function parsevCalendar($text, $base = 'VCALENDAR')
     {
+        $this->_attributes = $this->_components = array();
+
         if (preg_match('/^BEGIN:' . $base . '(.*)^END:' . $base . '/ism', $text, $matches)) {
             $container = true;
             $vCal = $matches[1];
@@ -680,7 +682,7 @@ class Horde_Icalendar
                         break;
                     }
                     $dates = array();
-                    $separator = $this->isOldFormat() ? ';' : ',';
+                    $separator = $this->oldFormat ? ';' : ',';
                     preg_match_all('/' . $separator . '([^' . $separator . ']*)/', $separator . $value, $values);
 
                     foreach ($values[1] as $value) {