Fix PHP fatal error when Sabre/VObject is not in include path (Bug #2214)
This commit is contained in:
parent
0f864cfd25
commit
7333082dd8
1 changed files with 6 additions and 6 deletions
|
@ -23,6 +23,11 @@
|
|||
|
||||
use \Sabre\VObject;
|
||||
|
||||
// load Sabre\VObject classes
|
||||
if (!class_exists('\Sabre\VObject\Reader')) {
|
||||
require_once __DIR__ . '/lib/Sabre/VObject/includes.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Class to parse and build vCalendar (iCalendar) files
|
||||
*
|
||||
|
@ -50,11 +55,6 @@ class libvcalendar
|
|||
*/
|
||||
function __construct($tz = null)
|
||||
{
|
||||
// load Sabre\VObject classes
|
||||
if (!class_exists('\Sabre\VObject\Reader')) {
|
||||
require_once(__DIR__ . '/lib/Sabre/VObject/includes.php');
|
||||
}
|
||||
|
||||
$this->timezone = $tz;
|
||||
$this->prodid = '-//Roundcube//Roundcube libcalendaring ' . RCUBE_VERSION . '//Sabre//Sabre VObject ' . VObject\Version::VERSION . '//EN';
|
||||
}
|
||||
|
@ -834,6 +834,7 @@ class libvcalendar
|
|||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Override Sabre\VObject\Property that quotes commas in the location property
|
||||
* because Apple clients treat that property as list.
|
||||
|
@ -880,4 +881,3 @@ class vobject_location_property extends VObject\Property
|
|||
return $out;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue