Fixes #755 Never thow '0000-00-00 00:00:00' as value but Null instead

only for exif ; iptc is ok
This commit is contained in:
flop25
2017-09-04 18:57:22 +02:00
parent d4487be684
commit 08cce48d4b
+4
View File
@@ -98,6 +98,10 @@ function get_sync_exif_data($file)
if (preg_match('/^(\d{4}).(\d{2}).(\d{2}) (\d{2}).(\d{2}).(\d{2})/', $value, $matches)) if (preg_match('/^(\d{4}).(\d{2}).(\d{2}) (\d{2}).(\d{2}).(\d{2})/', $value, $matches))
{ {
$exif[$pwg_key] = $matches[1].'-'.$matches[2].'-'.$matches[3].' '.$matches[4].':'.$matches[5].':'.$matches[6]; $exif[$pwg_key] = $matches[1].'-'.$matches[2].'-'.$matches[3].' '.$matches[4].':'.$matches[5].':'.$matches[6];
if ($exif[$pwg_key] == '0000-00-00 00:00:00')
{
$exif[$pwg_key] = Null;
}
} }
elseif (preg_match('/^(\d{4}).(\d{2}).(\d{2})/', $value, $matches)) elseif (preg_match('/^(\d{4}).(\d{2}).(\d{2})/', $value, $matches))
{ {