Fix: avoid Warning: Creating default object from empty value

This commit is contained in:
Regis Houssin 2018-04-13 11:20:21 +02:00
parent 85161f91ac
commit e6ff852226

View File

@ -97,7 +97,7 @@ class Conf
// First level object
// TODO Remove this part.
$this->expedition_bon = new stdClass();
$this->livraison_bon = new stdClass();
$this->livraison_bon = new stdClass();
$this->fournisseur = new stdClass();
$this->product = new stdClass();
$this->service = new stdClass();
@ -107,12 +107,13 @@ class Conf
$this->propal = new stdClass();
$this->facture = new stdClass();
$this->contrat = new stdClass();
$this->usergroup = new stdClass();
$this->usergroup = new stdClass();
$this->adherent = new stdClass();
$this->bank = new stdClass();
$this->notification = new stdClass();
$this->mailing = new stdClass();
$this->expensereport = new stdClass();
$this->expensereport = new stdClass();
$this->productbatch = new stdClass();
}
@ -509,7 +510,7 @@ class Conf
// Define list of limited modules (value must be key found for "name" property of module, so for example 'supplierproposal' for Module "Supplier Proposal"
if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,societe,propal,commande,facture,categorie,supplierproposal,fournisseur,contact,projet,contrat,ficheinter,expedition,agenda,resource,adherent,blockedlog'; // '' means 'all'. Note that contact is added here as it should be a module later.
// Module part to include an external module into the MAIN_MODULES_FOR_EXTERNAL list
// Module part to include an external module into the MAIN_MODULES_FOR_EXTERNAL list
if (! empty($this->modules_parts['moduleforexternal']))
foreach($this->modules_parts['moduleforexternal'] as $key=>$value) $this->global->MAIN_MODULES_FOR_EXTERNAL.=",$key";