]> source.dussan.org Git - nextcloud-server.git/commitdiff
Ignore errors when searching for bundled preview 31380/head
authorCôme Chilliet <come.chilliet@nextcloud.com>
Mon, 28 Feb 2022 14:40:33 +0000 (15:40 +0100)
committerCôme Chilliet <come.chilliet@nextcloud.com>
Mon, 28 Feb 2022 14:43:07 +0000 (15:43 +0100)
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 <come.chilliet@nextcloud.com>
lib/private/Preview/Bundled.php

index e0551bd392b6bd1cba4086018d7f125aaa0044d2..063c69ba5dd78e769b8703acb4f341daccd71a9a 100644 (file)
@@ -48,7 +48,7 @@ abstract class Bundled extends ProviderV2 {
                        $image->fixOrientation();
 
                        return $image;
-               } catch (\Exception $e) {
+               } catch (\Throwable $e) {
                        return null;
                }
        }