From ea0f776b92f5d984179d77cdc5c32966a69c76c8 Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Sat, 11 Mar 2006 08:09:12 +0000 Subject: [PATCH] Patch from Jan It is the simple patch to prevents the segfaulting of horde on ical with spaces in the begin:vevent etc lines. (just \W\w replaced by \S if I remember well at one place..) The second patch is for getting rid of some php5 warnings when it encounters the array_merge() in setParameter(). (only a simple cast to an array). --- phpgwapi/inc/horde/Horde/iCalendar.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/horde/Horde/iCalendar.php b/phpgwapi/inc/horde/Horde/iCalendar.php index cf27142374..f831ca36f1 100644 --- a/phpgwapi/inc/horde/Horde/iCalendar.php +++ b/phpgwapi/inc/horde/Horde/iCalendar.php @@ -117,7 +117,7 @@ class Horde_iCalendar { foreach ($keys as $key) { if ($this->_attributes[$key]['name'] == $name) { $this->_attributes[$key]['params'] = - array_merge($this->_attributes[$key]['params'] , $params); + array_merge((array)$this->_attributes[$key]['params'] , $params); return true; } } @@ -419,7 +419,7 @@ class Horde_iCalendar { // All subcomponents. $matches = null; - if (preg_match_all('/BEGIN:([\W\w]*)(\r\n|\r|\n)([\W\w]*)END:\1(\r\n|\r|\n)/U', $vCal, $matches)) { + if (preg_match_all('/BEGIN:([\S]*)(\r\n|\r|\n)([\W\w]*)END:\1(\r\n|\r|\n)/U', $vCal, $matches)) { foreach ($matches[0] as $key => $data) { $type = $matches[1][$key]; $component = &Horde_iCalendar::newComponent(trim($type), $this);