Catch format errors when trying to write an object of invalid or unknown type
This commit is contained in:
parent
5756c25276
commit
f5824e32b4
1 changed files with 3 additions and 0 deletions
|
@ -665,6 +665,9 @@ class kolab_storage_folder
|
|||
if (!$format)
|
||||
$format = kolab_format::factory($type);
|
||||
|
||||
if (PEAR::isError($format))
|
||||
return false;
|
||||
|
||||
$format->set($object);
|
||||
$xml = $format->write();
|
||||
$object['uid'] = $format->uid; // read UID from format
|
||||
|
|
Loading…
Add table
Reference in a new issue