diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 2e02f37ebec26..010f405e54940 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1820,7 +1820,7 @@ function init_repeat() $("#addreminder").prop("checked", true); // Set period with default reminder period - $("[name=\"offsetvalue\"]").val(\'' . dol_escape_js($reminderDefaultOffset) . '\'); + $("[name=\"offsetvalue\"]").val(\'' . dol_escape_js((string) $reminderDefaultOffset) . '\'); $("#select_offsetunittype_duration").select2("destroy"); $("#select_offsetunittype_duration").val(\''.dol_escape_js($reminderDefaultUnit).'\'); $("#select_offsetunittype_duration").select2(); @@ -1832,7 +1832,7 @@ function init_repeat() // Set default reminder mail model $("#select_actioncommsendmodel_mail").closest("tr").show(); $("#select_actioncommsendmodel_mail").select2("destroy"); - $("#select_actioncommsendmodel_mail").val(\''.dol_escape_js($reminderDefaultEmailModel).'\'); + $("#select_actioncommsendmodel_mail").val(\''.dol_escape_js((string) $reminderDefaultEmailModel).'\'); $("#select_actioncommsendmodel_mail").select2(); } }); diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 0a97ee8f40704..082639332beb0 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -484,6 +484,10 @@ public function create($user, $notrigger = 0) $error = 0; $now = dol_now(); + if (empty($this->date_creation)) { + $this->date_creation = $now; + } + $this->db->begin(); // Clean parameters diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 28422a2d77f6c..74696c589662e 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -10333,6 +10333,7 @@ public function createCommon(User $user, $notrigger = 0) if (array_key_exists('date_creation', $fieldvalues) && empty($fieldvalues['date_creation'])) { $fieldvalues['date_creation'] = $this->db->idate($now); + $this->date_creation = $this->db->idate($now); } if (array_key_exists('fk_user_creat', $fieldvalues) && !($fieldvalues['fk_user_creat'] > 0)) { $fieldvalues['fk_user_creat'] = $user->id; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index bb482bbf43313..555778e7124b0 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2237,7 +2237,11 @@ public function select_dolusers($selected = '', $htmlname = 'userid', $show_empt if ($errormessage) { $this->errors[] = $errormessage; dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR); - return -1; + if ($outputmode == 0) { + return 'Error bad param $morefilter'; + } else { + return array(); + } } } diff --git a/htdocs/core/lib/website2.lib.php b/htdocs/core/lib/website2.lib.php index 78a5e6a002947..0323e67265ada 100644 --- a/htdocs/core/lib/website2.lib.php +++ b/htdocs/core/lib/website2.lib.php @@ -796,7 +796,7 @@ function checkPHPCode(&$phpfullcodestringold, &$phpfullcodestring) if (!$error) { if (preg_match('/\*\/\s*\(/ims', $phpfullcodestring)) { $error++; - setEventMessages($langs->trans("DynamicPHPCodeContainsAForbiddenInstruction", $forbiddenphpmethod), null, 'errors'); + setEventMessages($langs->trans("DynamicPHPCodeContainsAForbiddenInstruction", "exec/*...*/ ('ls')"), null, 'errors'); } } diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 54c2238adfa0c..7b9029cf6b819 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -282,11 +282,12 @@