From a574aeff964b314e0a15199394317f4ae000792f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 30 Apr 2014 15:30:20 +0200 Subject: [PATCH] Qual: Removed warning --- htdocs/core/class/conf.class.php | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index d8dc5a65e66..ddd165d015f 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -318,10 +318,15 @@ class Conf $this->livraison_bon->enabled=defined("MAIN_SUBMODULE_LIVRAISON")?MAIN_SUBMODULE_LIVRAISON:0; // Module fournisseur - $this->fournisseur->commande->dir_output=$rootfordata."/fournisseur/commande"; - $this->fournisseur->commande->dir_temp =$rootfordata."/fournisseur/commande/temp"; - $this->fournisseur->facture->dir_output =$rootfordata."/fournisseur/facture"; - $this->fournisseur->facture->dir_temp =$rootfordata."/fournisseur/facture/temp"; + if (! empty($this->fournisseur)) + { + $this->fournisseur->commande=new stdClass(); + $this->fournisseur->commande->dir_output=$rootfordata."/fournisseur/commande"; + $this->fournisseur->commande->dir_temp =$rootfordata."/fournisseur/commande/temp"; + $this->fournisseur->facture=new stdClass(); + $this->fournisseur->facture->dir_output =$rootfordata."/fournisseur/facture"; + $this->fournisseur->facture->dir_temp =$rootfordata."/fournisseur/facture/temp"; + } // Module product/service $this->product->multidir_output=array($this->entity => $rootfordata."/produit"); @@ -433,6 +438,19 @@ class Conf if (empty($this->global->TAX_MODE_BUY_SERVICE)) $this->global->TAX_MODE_BUY_SERVICE='payment'; // Delay before warnings + // Avoid strict errors. TODO: Replace xxx->warning_delay with a property ->warning_delay_xxx + $this->propal->cloture = new stdClass(); + $this->propal->facturation = new stdClass(); + $this->commande->client = new stdClass(); + $this->commande->fournisseur = new stdClass(); + $this->facture->client = new stdClass(); + $this->facture->fournisseur = new stdClass(); + $this->contrat->services = new stdClass(); + $this->contrat->services->inactifs = new stdClass(); + $this->contrat->services->expires = new stdClass(); + $this->adherent->cotisation = new stdClass(); + $this->bank->rappro = new stdClass(); + $this->bank->cheque = new stdClass(); $this->actions->warning_delay=(isset($this->global->MAIN_DELAY_ACTIONS_TODO)?$this->global->MAIN_DELAY_ACTIONS_TODO:7)*24*60*60; $this->commande->client->warning_delay=(isset($this->global->MAIN_DELAY_ORDERS_TO_PROCESS)?$this->global->MAIN_DELAY_ORDERS_TO_PROCESS:2)*24*60*60; $this->commande->fournisseur->warning_delay=(isset($this->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS)?$this->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS:7)*24*60*60;