mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 02:16:41 +02:00
MDL-30393 lib/bennu minor fixes for RFC-2445 and PHP 5.x support.
This commit is contained in:
parent
fe41ba7489
commit
95641b4529
3 changed files with 55 additions and 2 deletions
|
@ -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<label>[-[:alnum:]]+)(?P<params>(?:;(?:(?:[-[:alnum:]]+)=(?:[^[:cntrl:]";:,]+|"[^[:cntrl:]"]+")))*):(?P<data>.*)$#', $line, $match)) {
|
||||
$this->parser_error('Invalid line: '.$key.', ignoring');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue