From c0154f4ac8fe6b292197c3b9cdc916dd8d9c92ea Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 28 Aug 2022 13:49:41 +0200 Subject: [PATCH] FIX php8 compatibility --- htdocs/compta/accounting-files.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index f2f9d6e3f56..30d2bedcf14 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -122,7 +122,7 @@ if (isModEnabled('multicompany') && is_object($mc)) { } $entity = (GETPOSTISSET('entity') ? GETPOST('entity', 'int') : (GETPOSTISSET('search_entity') ? GETPOST('search_entity', 'int') : $conf->entity)); -if (!empty($conf->multicompany->enabled) && is_object($mc)) { +if (isModEnabled('multicompany') && is_object($mc)) { if (empty($entity) && !empty($conf->global->MULTICOMPANY_ALLOW_EXPORT_ACCOUNTING_DOC_FOR_ALL_ENTITIES)) { $entity = '0,'.join(',', array_keys($arrayofentities)); } @@ -456,7 +456,7 @@ if ($result && $action == "dl" && !$error) { dol_mkdir($dirfortmpfile); $log = $langs->transnoentitiesnoconv("Type"); - if (!empty($conf->multicompany->enabled) && is_object($mc)) { + if (isModEnabled('multicompany') && is_object($mc)) { $log .= ','.$langs->transnoentitiesnoconv("Entity"); } $log .= ','.$langs->transnoentitiesnoconv("Date"); @@ -498,7 +498,7 @@ if ($result && $action == "dl" && !$error) { } $log .= '"'.$langs->trans($file['item']).'"'; - if (!empty($conf->multicompany->enabled) && is_object($mc)) { + if (isModEnabled('multicompany') && is_object($mc)) { $log .= ',"'.(empty($arrayofentities[$file['entity']]) ? $file['entity'] : $arrayofentities[$file['entity']]).'"'; } $log .= ','.dol_print_date($file['date'], 'dayrfc'); @@ -583,7 +583,7 @@ print "\n"; // Export is for current company only $socid = 0; -if (!empty($conf->multicompany->enabled) && is_object($mc)) { +if (isModEnabled('multicompany') && is_object($mc)) { $mc->getInfo($conf->entity); print '('.$langs->trans("Entity").' : '; print "";