Merge pull request #13441 from hgy29/patch-1

FIX: extra date field incorrect check
This commit is contained in:
Laurent Destailleur 2020-03-30 19:30:25 +02:00 committed by GitHub
commit 7c9583011a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2150,7 +2150,7 @@ class ExtraFields
if (in_array($key_type, array('date', 'datetime')))
{
if (! GETPOSTISSET($keysuffix."options_".$key.$keyprefix)."year") continue; // Value was not provided, we should not set it.
if (! GETPOSTISSET($keysuffix."options_".$key.$keyprefix."year")) continue; // Value was not provided, we should not set it.
// Clean parameters
$value_key = dol_mktime(GETPOST($keysuffix."options_".$key.$keyprefix."hour", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."min", 'int'), 0, GETPOST($keysuffix."options_".$key.$keyprefix."month", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."day", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."year", 'int'));
}