6.0.0-beta1
9/20/25

[#924] warning importing iCalendar file with EXDATE fields
Summary warning importing iCalendar file with EXDATE fields
Queue Horde Framework Packages
Type Bug
State Resolved
Priority 1. Low
Owners chuck (at) horde (dot) org
Requester srrafa (at) usc (dot) es
Created 12/01/2004 (7598 days ago)
Due
Updated 12/05/2004 (7594 days ago)
Assigned 12/01/2004 (7598 days ago)
Resolved 12/05/2004 (7594 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
12/05/2004 02:47:09 AM Chuck Hagenbuch Comment #6
State ⇒ Resolved
Reply to this comment
Fixed in CVS, will be in RC3.
12/05/2004 02:03:10 AM Chuck Hagenbuch Comment #5
Assigned to Chuck Hagenbuch
Taken from Karsten Fourmont
Reply to this comment
I think Karsten is away for a bit, I'll look at this.
12/01/2004 01:01:17 PM Jan Schneider Assigned to Karsten Fourmont
State ⇒ Assigned
 
12/01/2004 12:54:42 PM srrafa (at) usc (dot) es Comment #4 Reply to this comment
Sorry. This report has to do with HORDE-3.0-rc2
12/01/2004 12:49:44 PM srrafa (at) usc (dot) es Comment #3
New Attachment: joe.ics Download
Reply to this comment
This is the file used for testing. Taken from



http://ical.mac.com/durban/Nasa32History.ics
12/01/2004 12:48:00 PM srrafa (at) usc (dot) es Comment #2 Reply to this comment
Adding some var_dump commands in lib/horde/iCalendar.php around the 
code that manages the EXDATE field, I get this



tag= string(6) "EXDATE"

value= string(8) "20030428"

params= array(1) { ["VALUE"]=>  string(4) "DATE" }

values= array(2) { [0]=>  array(1) { [0]=>  string(9) ",20030428" } 
[1]=>  array(1) { [0]=>  string(8) "20030428" } }



It seems that  since values is an array of arrays, _parseDate is 
called with an array parameter instead of a string



case 'EXDATE':

                     $values = array();

                     $dates = array();

                     preg_match_all('/,([^,]*)/', ',' . $value, $values);



foreach ($values as $value) {

                         if (isset($params['VALUE'])) {

                             if ($params['VALUE'] == 'DATE-TIME') {

                                 $dates[] = $this->_parseDateTime($value);

                             } elseif ($params['VALUE'] == 'DATE') {

                                 print "<br><b>Lo parseamos como DATE</b><br>";

                                 $dates[] = $this->_parseDate($value);

                             }

                         } else {

                             $dates[] = $this->_parseDateTime($value);

                         }

                     }


12/01/2004 12:43:18 PM srrafa (at) usc (dot) es Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ warning importing iCalendar file with EXDATE fields
Queue ⇒ Horde Framework Packages
State ⇒ Unconfirmed
Reply to this comment
When importing an .ics file that contains an EXDATE field, the event 
is imported succesfully but this warning is shown in the screen:



Notice: Array to string conversion in 
/var/www/horde-3.0-rc2/lib/Horde/iCalendar.php on line 976



The same happens when I add a remote calendar.



This line is in the parseDate function (the strlen command)



function _parseDate($text)

     {

         if (strlen($text) != 8) {

             return false;

         }



         $date['year']  = intval(substr($text, 0, 4));

         $date['month'] = intval(substr($text, 4, 2));

         $date['mday']  = intval(substr($text, 6, 2));



         return $date;

     }




Saved Queries