From e6ff852226d67d535ab16c367f45cb2ff458492e Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 13 Apr 2018 11:20:21 +0200 Subject: [PATCH] Fix: avoid Warning: Creating default object from empty value --- htdocs/core/class/conf.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 0ea6af8d5de..82cc919346b 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -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";