merged r28876 from Jaytraxx: recognize zero value also as a real value

This commit is contained in:
Ralf Becker 2009-12-31 22:16:05 +00:00
parent 6081223119
commit f609bdde32

View File

@ -1141,7 +1141,7 @@ class Horde_iCalendar {
} else { } else {
$value = str_replace(array("\r", "\n"), array('', '\\n'), $value); $value = str_replace(array("\r", "\n"), array('', '\\n'), $value);
$attr_string = $name . $params_str; $attr_string = $name . $params_str;
if (!empty($value)) { if (!empty($value) || $value === 0 || (is_string($value) && strlen($value) > 0)) {
$attr_string .= ':' . $value; $attr_string .= ':' . $value;
} elseif ($name != 'RRULE') { } elseif ($name != 'RRULE') {
$attr_string .= ':'; $attr_string .= ':';