diff --git a/build/phpstan/phpstan-baseline.neon b/build/phpstan/phpstan-baseline.neon index 48e5c9f8c08bf..6616e9c1b8743 100644 --- a/build/phpstan/phpstan-baseline.neon +++ b/build/phpstan/phpstan-baseline.neon @@ -17930,21 +17930,6 @@ parameters: count: 1 path: ../../htdocs/opensurvey/results.php - - - message: "#^Parameter \\#4 \\$month of function dol_mktime expects int, array\\|string given\\.$#" - count: 1 - path: ../../htdocs/opensurvey/wizard/create_survey.php - - - - message: "#^Parameter \\#5 \\$day of function dol_mktime expects int, array\\|string given\\.$#" - count: 1 - path: ../../htdocs/opensurvey/wizard/create_survey.php - - - - message: "#^Parameter \\#6 \\$year of function dol_mktime expects int, array\\|string given\\.$#" - count: 1 - path: ../../htdocs/opensurvey/wizard/create_survey.php - - message: "#^Variable \\$allow_comments might not be defined\\.$#" count: 1 diff --git a/htdocs/core/lib/customreports.lib.php b/htdocs/core/lib/customreports.lib.php index a94891c00d7b3..ac3cab1aa642c 100644 --- a/htdocs/core/lib/customreports.lib.php +++ b/htdocs/core/lib/customreports.lib.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2024 Laurent Destailleur * Copyright (C) 2024 Frédéric France * Copyright (C) 2024 MDW * @@ -591,7 +591,7 @@ function fillArrayOfFilterFields($object, $tablealias, $labelofobject, &$arrayof 'position' => 1000 + (int) $extrafields->attributes[$object->table_element]['pos'][$key] + ($count * 100000), 'table' => $object->table_element, 'tablefromt' => $tablepath, - 'type' => $val['type'] // TODO: Check this, seems a copy/paste error + 'type' => $extrafields->attributes[$object->table_element]['type'][$key], ); } } diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index 6df9d1ec060b0..0cf7deab04fdc 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -93,7 +93,7 @@ $testdate = false; $champdatefin = (int) dol_mktime(23, 59, 59, GETPOSTINT('champdatefinmonth'), GETPOSTINT('champdatefinday'), GETPOSTINT('champdatefinyear')); - if ($champdatefin > 0) { // A date was provided, $error still 0 here + if ($champdatefin > 0) { // A date was provided // Expire date is not before today if ($champdatefin >= dol_now()) { $testdate = true;