fix param

This commit is contained in:
Frédéric France
2024-01-20 09:22:38 +01:00
parent 02d520b5a7
commit 03e29c6960
155 changed files with 214 additions and 212 deletions

View File

@@ -2946,7 +2946,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'auto', $outputlangs =
// Analyze date
$reg = array();
if (preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])$/i', $time, $reg)) { // Deprecated. Ex: 1970-01-01, 1970-01-01 01:00:00, 19700101010000
dol_print_error('', "Functions.lib::dol_print_date function called with a bad value from page ".(empty($_SERVER["PHP_SELF"]) ? 'unknown' : $_SERVER["PHP_SELF"]));
dol_print_error(null, "Functions.lib::dol_print_date function called with a bad value from page ".(empty($_SERVER["PHP_SELF"]) ? 'unknown' : $_SERVER["PHP_SELF"]));
return '';
} elseif (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+) ?([0-9]+)?:?([0-9]+)?:?([0-9]+)?/i', $time, $reg)) { // Still available to solve problems in extrafields of type date
// This part of code should not be used anymore.
@@ -9111,7 +9111,7 @@ function setEventMessages($mesg, $mesgs, $style = 'mesgs', $messagekey = '', $no
}
if (empty($messagekey) || empty($_COOKIE["DOLHIDEMESSAGE".$messagekey])) {
if (!in_array((string) $style, array('mesgs', 'warnings', 'errors'))) {
dol_print_error('', 'Bad parameter style='.$style.' for setEventMessages');
dol_print_error(null, 'Bad parameter style='.$style.' for setEventMessages');
}
if (empty($mesgs)) {
setEventMessage($mesg, $style, $noduplicate);
@@ -12755,7 +12755,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n
// Check parameters
if (!is_object($filterobj) && !is_object($objcon)) {
dol_print_error('', 'BadParameter');
dol_print_error(null, 'BadParameter');
}
$histo = array();