mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-08 14:25:02 +02:00
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:
@@ -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))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user