Work on PHP 8 compatibility
This commit is contained in:
parent
f5ce54728d
commit
6b7de51d21
@ -358,11 +358,12 @@ class Conf
|
||||
if ($modulename == 'supplierproposal') {
|
||||
$modulename = 'supplier_proposal';
|
||||
}
|
||||
$this->modules[$modulename] = $modulename; // Add this module in list of enabled modules
|
||||
// deprecated
|
||||
if (!isset($this->$modulename) || !is_object($this->$modulename)) {
|
||||
$this->$modulename = new stdClass();
|
||||
}
|
||||
$this->$modulename->enabled = true;
|
||||
$this->modules[] = $modulename; // Add this module in list of enabled modules
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -166,7 +166,9 @@ function getDolUserInt($key, $default = 0, $tmpuser = null)
|
||||
function isModEnabled($module)
|
||||
{
|
||||
global $conf;
|
||||
return !empty($conf->$module->enabled);
|
||||
|
||||
return !empty($conf->modules[$module]);
|
||||
//return !empty($conf->$module->enabled);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -323,6 +323,7 @@ if (!isset($conf->syslog) || !is_object($conf->syslog)) {
|
||||
$conf->syslog = new stdClass();
|
||||
}
|
||||
$conf->syslog->enabled = 1;
|
||||
$conf->modules['syslog'] = 'syslog';
|
||||
$conf->global->SYSLOG_LEVEL = constant('LOG_DEBUG');
|
||||
if (!defined('SYSLOG_HANDLERS')) {
|
||||
define('SYSLOG_HANDLERS', '["mod_syslog_file"]');
|
||||
@ -435,6 +436,7 @@ function conf($dolibarr_main_document_root)
|
||||
$conf->syslog = new stdClass();
|
||||
}
|
||||
$conf->syslog->enabled = 1;
|
||||
$conf->modules['syslog'] = 'syslog';
|
||||
$conf->global->SYSLOG_LEVEL = constant('LOG_DEBUG');
|
||||
if (!defined('SYSLOG_HANDLERS')) {
|
||||
define('SYSLOG_HANDLERS', '["mod_syslog_file"]');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user