Null coalesce exif props explicitly

pull/37/head
Varun Patil 2022-09-09 08:42:44 -07:00
parent 874379b306
commit ff29114429
1 changed files with 2 additions and 2 deletions

View File

@ -183,9 +183,9 @@ class Exif {
* @param array $exif * @param array $exif
*/ */
public static function getDateTaken(File &$file, array &$exif) { public static function getDateTaken(File &$file, array &$exif) {
$dt = $exif['DateTimeOriginal']; $dt = $exif['DateTimeOriginal'] ?? null;
if (!isset($dt) || empty($dt)) { if (!isset($dt) || empty($dt)) {
$dt = $exif['CreateDate']; $dt = $exif['CreateDate'] ?? null;
} }
// Check if found something // Check if found something