[Tickets #924] warning importing iCalendar file with EXDATE fields

bugs at bugs.horde.org bugs at bugs.horde.org
Wed Dec 1 04:48:02 PST 2004


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=924
-----------------------------------------------------------------------
 Ticket     | 924
 Updated By | srrafa at usc.es
 Summary    | warning importing iCalendar file with EXDATE fields
 Queue      | Horde Framework Packages
 State      | Unconfirmed
 Priority   | 1. Low
 Type       | Bug
 Owners     | 
-----------------------------------------------------------------------


srrafa at usc.es (2004-12-01 04:48) wrote:

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);
                        }
                    }





More information about the bugs mailing list