From ff291144294f8ab0a43e7a7dbb6a12d966fb0d51 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Fri, 9 Sep 2022 08:42:44 -0700 Subject: [PATCH] Null coalesce exif props explicitly --- lib/Exif.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Exif.php b/lib/Exif.php index 6c0c7f5d..425b5e1f 100644 --- a/lib/Exif.php +++ b/lib/Exif.php @@ -183,9 +183,9 @@ class Exif { * @param array $exif */ public static function getDateTaken(File &$file, array &$exif) { - $dt = $exif['DateTimeOriginal']; + $dt = $exif['DateTimeOriginal'] ?? null; if (!isset($dt) || empty($dt)) { - $dt = $exif['CreateDate']; + $dt = $exif['CreateDate'] ?? null; } // Check if found something