-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
Description
I'm using your script with Exiftool adapter and I'm getting a fatal error in PHPExif\Exif.php on line 698 (public function setCreationDate(\DateTime $value)
) since bool is passed to a function and it's type-hinted to receive a DateTime object, but I'm getting this error only for some images. I dig around a bit and I realized that some images had date format of 'Y:m:d H:i:s' and others had 'Y:m:d H:i:sP'. I fixed it by extending a mapper (PHPExif\Mapper\Exiftool
) class and skipped CreateDate key if a value is not an instance of DateTime, but maybe it should parse that date regardless of format since it's readable by exiftool so I assume it is a valid value for that tag.