From eaff81c831ca82cca63712f180d68a33196c3319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 28 Feb 2022 15:40:33 +0100 Subject: Ignore errors when searching for bundled preview MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 f026d3259f5..6b5a8aa2d12 100644 --- a/lib/private/Preview/Bundled.php +++ b/lib/private/Preview/Bundled.php @@ -46,7 +46,7 @@ abstract class Bundled extends ProviderV2 { $image->fixOrientation(); return $image; - } catch (\Exception $e) { + } catch (\Throwable $e) { return null; } } -- cgit v1.2.3