From 31fca2897a5cc947b86ecb065d3c9f42fcfccf73 Mon Sep 17 00:00:00 2001 From: Nicolas Bouquet Date: Mon, 30 Mar 2020 10:24:42 +0200 Subject: [PATCH] FIX: extra date field incorrect check Small typo fixed, was preventing extra date fields from being processed, leading to denial of object creation --- htdocs/core/class/extrafields.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index cf439f210be..0938da39dcd 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -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')); }