FIX: extra date field incorrect check

Small typo fixed, was preventing extra date fields from being processed, leading to denial of object creation
This commit is contained in:
Nicolas Bouquet 2020-03-30 10:24:42 +02:00 committed by GitHub
parent 9b2da5bdae
commit 31fca2897a
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'));
}