From: Côme Chilliet Date: Mon, 28 Feb 2022 14:40:33 +0000 (+0100) Subject: Ignore errors when searching for bundled preview X-Git-Tag: v24.0.0beta1~143^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F31380%2Fhead;p=nextcloud-server.git Ignore errors when searching for bundled preview When an odt file is xml and not zip, it would throw a ValueError. It will now just ignore this file and return null for the preview. Signed-off-by: Côme Chilliet --- diff --git a/lib/private/Preview/Bundled.php b/lib/private/Preview/Bundled.php index e0551bd392b..063c69ba5dd 100644 --- a/lib/private/Preview/Bundled.php +++ b/lib/private/Preview/Bundled.php @@ -48,7 +48,7 @@ abstract class Bundled extends ProviderV2 { $image->fixOrientation(); return $image; - } catch (\Exception $e) { + } catch (\Throwable $e) { return null; } }