From 94516d183b00f0ef460c1795f96908cfaecf4586 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Fri, 25 Nov 2022 07:32:24 -0800 Subject: [PATCH] Prevent log spam when missing mime (#258) --- lib/Db/LivePhoto.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Db/LivePhoto.php b/lib/Db/LivePhoto.php index 074a619c..e0d1d2c5 100644 --- a/lib/Db/LivePhoto.php +++ b/lib/Db/LivePhoto.php @@ -20,7 +20,9 @@ class LivePhoto /** Check if a given Exif data is the video part of a live photo */ public function isVideoPart(array &$exif) { - return 'video/quicktime' === $exif['MIMEType'] && \array_key_exists('ContentIdentifier', $exif); + return \array_key_exists('MIMEType', $exif) + && 'video/quicktime' === $exif['MIMEType'] + && \array_key_exists('ContentIdentifier', $exif); } /** Get liveid from photo part */