From 13c11208d48dd6881f6afcab88d78bf6f4ba75da Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Mon, 28 Feb 2022 15:40:33 +0100 Subject: [PATCH] Ignore errors when searching for bundled preview MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- lib/private/Preview/Bundled.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } -- 2.39.5