From 08cce48d4bc6cadce44e580b4c298212e22a8008 Mon Sep 17 00:00:00 2001 From: flop25 Date: Mon, 4 Sep 2017 18:57:22 +0200 Subject: [PATCH] Fixes #755 Never thow '0000-00-00 00:00:00' as value but Null instead only for exif ; iptc is ok --- admin/include/functions_metadata.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/admin/include/functions_metadata.php b/admin/include/functions_metadata.php index 01b453816..794722c93 100644 --- a/admin/include/functions_metadata.php +++ b/admin/include/functions_metadata.php @@ -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)) { $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)) { @@ -274,7 +278,7 @@ SELECT id, path, representative_ext } $data['date_metadata_update'] = CURRENT_DATE; - + $datas[] = $data; }