From 6a3a9448288b7aeecc195be23f486d20f168c745 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 5 Oct 2017 11:00:38 +0200 Subject: [PATCH] fix uncaught exception if Collabora is not configured or reachable --- api/src/Storage/Merge.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/api/src/Storage/Merge.php b/api/src/Storage/Merge.php index 7756c4b0b8..e835381903 100644 --- a/api/src/Storage/Merge.php +++ b/api/src/Storage/Merge.php @@ -1867,9 +1867,15 @@ abstract class Merge $documents = array(); $editable_mimes = array(); if ($export_limit == null) $export_limit = self::getExportLimit(); // check if there is a globalsetting - if (class_exists('EGroupware\\collabora\\Bo') && $discovery = \EGroupware\collabora\Bo::discover()) - { - $editable_mimes = $discovery; + try { + if (class_exists('EGroupware\\collabora\\Bo') && $discovery = \EGroupware\collabora\Bo::discover()) + { + $editable_mimes = $discovery; + } + } + catch (\Exception $e) { + unset($e); + // ignore failed discovery } if ($default_doc && ($file = Api\Vfs::stat($default_doc))) // put default document on top {