From c9d24528469128128c56cc632b240a4a1ec753d9 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 24 Aug 2022 10:02:06 +0200 Subject: [PATCH] FIX php8 compatibility --- htdocs/admin/delais.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 2ae77b03d07..af8fed1c197 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -172,7 +172,7 @@ if (!isset($conf->global->MAIN_DELAY_ORDERS_TO_PROCESS)) { if ($action == 'update') { foreach ($modules as $module => $delays) { - if (!empty($conf->$module->enabled)) { + if (isModEnabled('module')) { foreach ($delays as $delay) { if (GETPOST($delay['code']) != '') { dolibarr_set_const($db, $delay['code'], GETPOST($delay['code']), 'chaine', 0, '', $conf->entity); @@ -226,13 +226,13 @@ if ($action == 'edit') { print ''.$langs->trans("LateWarningAfter").''; foreach ($modules as $module => $delays) { - if (!empty($conf->$module->enabled)) { + if (isModEnabled('module')) { foreach ($delays as $delay) { - $value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']}:0); + $value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']} : 0); print ''; - print ''.img_object('', $delay['img']).''; - print ''.$langs->trans('Delays_'.$delay['code']).''; - print ' '.$langs->trans("days").''; + print '' . img_object('', $delay['img']) . ''; + print '' . $langs->trans('Delays_' . $delay['code']) . ''; + print ' ' . $langs->trans("days") . ''; } } } @@ -260,13 +260,13 @@ if ($action == 'edit') { print ''.$langs->trans("DelaysOfToleranceBeforeWarning").''.$langs->trans("Value").''; foreach ($modules as $module => $delays) { - if (!empty($conf->$module->enabled)) { + if (isModEnabled('module')) { foreach ($delays as $delay) { - $value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']}:0); + $value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']} : 0); print ''; - print ''.img_object('', $delay['img']).''; - print ''.$langs->trans('Delays_'.$delay['code']).''; - print ''.$value.' '.$langs->trans("days").''; + print '' . img_object('', $delay['img']) . ''; + print '' . $langs->trans('Delays_' . $delay['code']) . ''; + print '' . $value . ' ' . $langs->trans("days") . ''; } } }