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 |
State ⇒ Resolved
Assigned to Chuck Hagenbuch
Taken from Karsten Fourmont
State ⇒ Assigned
New Attachment: joe.ics
http://ical.mac.com/durban/Nasa32History.ics
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);
}
}
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ warning importing iCalendar file with EXDATE fields
Queue ⇒ Horde Framework Packages
State ⇒ Unconfirmed
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;
}