From b43527de8fa4cb8e327f9f651090cf5751dce6ed Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 28 Aug 2022 13:52:48 +0200 Subject: [PATCH] FIX php8 compatibility --- htdocs/core/class/conf.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 626052551d5..234f8d80e0c 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -371,7 +371,7 @@ class Conf } // Object $mc - if (!defined('NOREQUIREMC') && !empty($this->multicompany->enabled)) { + if (!defined('NOREQUIREMC') && isModEnabled('multicompany')) { global $mc; $ret = @dol_include_once('/multicompany/class/actions_multicompany.class.php'); if ($ret) { @@ -425,7 +425,7 @@ class Conf $rootfordata = DOL_DATA_ROOT; $rootforuser = DOL_DATA_ROOT; // If multicompany module is enabled, we redefine the root of data - if (!empty($this->multicompany->enabled) && !empty($this->entity) && $this->entity > 1) { + if (isModEnabled('multicompany') && !empty($this->entity) && $this->entity > 1) { $rootfordata .= '/'.$this->entity; } // Set standard temporary folder name or global override @@ -987,7 +987,7 @@ class Conf } // Object $mc - if (!defined('NOREQUIREMC') && !empty($this->multicompany->enabled)) { + if (!defined('NOREQUIREMC') && isModEnabled('multicompany')) { if (is_object($mc)) { $mc->setValues($this); }