Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 15.0

This commit is contained in:
Laurent Destailleur 2022-02-06 13:06:27 +01:00
commit cd491280cf
2 changed files with 2 additions and 2 deletions

View File

@ -321,7 +321,7 @@ class FormSetup
*/
public function addItemsFromParamsArray($params)
{
if (!array($params)) { return false; }
if (!is_array($params) || empty($params)) { return false; }
foreach ($params as $confKey => $param) {
$this->addItemFromParams($confKey, $param); // todo manage error
}

View File

@ -95,7 +95,7 @@ $setupnotempty = 0;
// Set this to 1 to use the factory to manage constants. Warning, the generated module will be compatible with version v15+ only
$useFormSetup = 0;
// Convert arrayofparameter into a formSetup object
if (!empty($arrayofparameters) && $useFormSetup && (float) DOL_VERSION >= 15) {
if ($useFormSetup && (float) DOL_VERSION >= 15) {
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsetup.class.php';
$formSetup = new FormSetup($db);