From 95641b4529a010c8b053aa02418eb88d65a69b7f Mon Sep 17 00:00:00 2001 From: Jonathan Harker Date: Tue, 22 Nov 2011 12:53:01 +1300 Subject: [PATCH] MDL-30393 lib/bennu minor fixes for RFC-2445 and PHP 5.x support. --- lib/bennu/iCalendar_components.php | 5 ++++ lib/bennu/iCalendar_parameters.php | 4 +-- lib/bennu/iCalendar_properties.php | 48 ++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/lib/bennu/iCalendar_components.php b/lib/bennu/iCalendar_components.php index 92350981dc0..3c2936b1a22 100644 --- a/lib/bennu/iCalendar_components.php +++ b/lib/bennu/iCalendar_components.php @@ -237,6 +237,11 @@ class iCalendar_component { $components = array(); // Initialise a stack of components $this->clear_errors(); foreach ($lines as $key => $line) { + // ignore empty lines + if (trim($line) == '') { + continue; + } + // Divide the line up into label, parameters and data fields. if (!preg_match('#^(?P