Fix: Removed warnings
This commit is contained in:
parent
591eab4826
commit
0e13b3872d
@ -767,7 +767,7 @@ if ($id)
|
||||
// Line to type new values
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
$obj = (object) array();
|
||||
$obj = new stdClass();
|
||||
// If data was already input, we define them in obj to populate input fields.
|
||||
if (GETPOST('actionadd'))
|
||||
{
|
||||
|
||||
@ -89,12 +89,12 @@ class ActionComm extends CommonObject
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->author = (object) array();
|
||||
$this->usermod = (object) array();
|
||||
$this->usertodo = (object) array();
|
||||
$this->userdone = (object) array();
|
||||
$this->societe = (object) array();
|
||||
$this->contact = (object) array();
|
||||
$this->author = new stdClass();
|
||||
$this->usermod = new stdClass();
|
||||
$this->usertodo = new stdClass();
|
||||
$this->userdone = new stdClass();
|
||||
$this->societe = new stdClass();
|
||||
$this->contact = new stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -2405,7 +2405,7 @@ class Propal extends CommonObject
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$this->lines[$i] = (object) array();
|
||||
$this->lines[$i] = new stdClass();
|
||||
$this->lines[$i]->id = $obj->rowid; // for backward compatibility
|
||||
$this->lines[$i]->rowid = $obj->rowid;
|
||||
$this->lines[$i]->label = $obj->custom_label;
|
||||
|
||||
@ -212,7 +212,7 @@ $head[$h][1] = $langs->trans("ByMonthYear");
|
||||
$head[$h][2] = 'byyear';
|
||||
$h++;
|
||||
|
||||
$object=(object) array(); // TODO $object not defined ?
|
||||
$object=new stdClass(); // TODO $object not defined ?
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'propal_stats');
|
||||
|
||||
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
|
||||
|
||||
@ -233,7 +233,7 @@ $h++;
|
||||
if ($mode == 'customer') $type='order_stats';
|
||||
if ($mode == 'supplier') $type='supplier_order_stats';
|
||||
|
||||
$object=(object) array(); // TODO $object not defined ?
|
||||
$object=new stdClass(); // TODO $object not defined ?
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,$type);
|
||||
|
||||
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
|
||||
|
||||
@ -513,7 +513,7 @@ class RemiseCheque extends CommonObject
|
||||
$i = 0;
|
||||
while ($objp = $this->db->fetch_object($result))
|
||||
{
|
||||
$docmodel->lines[$i] = (object) array();
|
||||
$docmodel->lines[$i] = new stdClass();
|
||||
$docmodel->lines[$i]->bank_chq = $objp->banque;
|
||||
$docmodel->lines[$i]->emetteur_chq = $objp->emetteur;
|
||||
$docmodel->lines[$i]->amount_chq = $objp->amount;
|
||||
|
||||
@ -79,32 +79,32 @@ class Conf
|
||||
function __construct()
|
||||
{
|
||||
// Avoid warnings when filling this->xxx
|
||||
$this->file = (object) array();
|
||||
$this->db = (object) array();
|
||||
$this->global = (object) array();
|
||||
$this->mycompany = (object) array();
|
||||
$this->admin = (object) array();
|
||||
$this->user = (object) array();
|
||||
$this->syslog = (object) array();
|
||||
$this->browser = (object) array();
|
||||
$this->multicompany = (object) array();
|
||||
$this->file = new stdClass();
|
||||
$this->db = new stdClass();
|
||||
$this->global = new stdClass();
|
||||
$this->mycompany = new stdClass();
|
||||
$this->admin = new stdClass();
|
||||
$this->user = new stdClass();
|
||||
$this->syslog = new stdClass();
|
||||
$this->browser = new stdClass();
|
||||
$this->multicompany = new stdClass();
|
||||
|
||||
// First level object
|
||||
$this->expedition_bon = (object) array();
|
||||
$this->livraison_bon = (object) array();
|
||||
$this->fournisseur = (object) array();
|
||||
$this->product = (object) array();
|
||||
$this->service = (object) array();
|
||||
$this->contrat = (object) array();
|
||||
$this->actions = (object) array();
|
||||
$this->commande = (object) array();
|
||||
$this->propal = (object) array();
|
||||
$this->facture = (object) array();
|
||||
$this->contrat = (object) array();
|
||||
$this->adherent = (object) array();
|
||||
$this->bank = (object) array();
|
||||
$this->notification = (object) array();
|
||||
$this->mailing = (object) array();
|
||||
$this->expedition_bon = new stdClass();
|
||||
$this->livraison_bon = new stdClass();
|
||||
$this->fournisseur = new stdClass();
|
||||
$this->product = new stdClass();
|
||||
$this->service = new stdClass();
|
||||
$this->contrat = new stdClass();
|
||||
$this->actions = new stdClass();
|
||||
$this->commande = new stdClass();
|
||||
$this->propal = new stdClass();
|
||||
$this->facture = new stdClass();
|
||||
$this->contrat = new stdClass();
|
||||
$this->adherent = new stdClass();
|
||||
$this->bank = new stdClass();
|
||||
$this->notification = new stdClass();
|
||||
$this->mailing = new stdClass();
|
||||
|
||||
//! Charset for HTML output and for storing data in memory
|
||||
$this->file->character_set_client='UTF-8'; // UTF-8, ISO-8859-1
|
||||
@ -193,7 +193,7 @@ class Conf
|
||||
{
|
||||
$modulename=strtolower($reg[1]);
|
||||
if ($modulename == 'propale') $modulename='propal';
|
||||
if (! isset($this->$modulename) || ! is_object($this->$modulename)) $this->$modulename=(object) array();
|
||||
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
|
||||
}
|
||||
@ -216,20 +216,20 @@ class Conf
|
||||
}
|
||||
|
||||
// Second or others levels object
|
||||
$this->propal->cloture = (object) array();
|
||||
$this->propal->facturation = (object) array();
|
||||
$this->commande->client = (object) array();
|
||||
$this->commande->fournisseur = (object) array();
|
||||
$this->facture->client = (object) array();
|
||||
$this->facture->fournisseur = (object) array();
|
||||
$this->fournisseur->commande = (object) array();
|
||||
$this->fournisseur->facture = (object) array();
|
||||
$this->contrat->services = (object) array();
|
||||
$this->contrat->services->inactifs = (object) array();
|
||||
$this->contrat->services->expires = (object) array();
|
||||
$this->adherent->cotisation = (object) array();
|
||||
$this->bank->rappro = (object) array();
|
||||
$this->bank->cheque = (object) array();
|
||||
$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->fournisseur->commande = new stdClass();
|
||||
$this->fournisseur->facture = 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();
|
||||
|
||||
// Clean some variables
|
||||
if (empty($this->global->MAIN_MENU_STANDARD)) $this->global->MAIN_MENU_STANDARD="eldy_backoffice.php";
|
||||
|
||||
@ -385,7 +385,7 @@ function agenda_prepare_head()
|
||||
$h++;
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'agenda_admin');
|
||||
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/agenda_extrafields.php";
|
||||
$head[$h][1] = $langs->trans("ExtraFields");
|
||||
$head[$h][2] = 'attributes';
|
||||
@ -455,7 +455,7 @@ function calendars_prepare_head($param)
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
||||
$object=(object) array();
|
||||
$object=new stdClass();
|
||||
|
||||
// Show more tabs from modules
|
||||
// Entries must be declared in modules descriptor with line
|
||||
|
||||
@ -406,7 +406,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql_rows);
|
||||
|
||||
$this->lines[$i] = (object) array();
|
||||
$this->lines[$i] = new stdClass();
|
||||
$this->lines[$i]->rowid = $obj->rowid;
|
||||
$this->lines[$i]->description = $obj->description;
|
||||
$this->lines[$i]->ref = $obj->product_ref; // TODO deprecated
|
||||
|
||||
@ -252,7 +252,7 @@ if ($user->societe_id == 0)
|
||||
}
|
||||
}
|
||||
|
||||
$object=(object) array();
|
||||
$object=new stdClass();
|
||||
$parameters=array();
|
||||
$action='';
|
||||
$reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -48,10 +48,10 @@ require_once ADODB_PATH.'adodb-time.inc.php';
|
||||
|
||||
// Avoid warnings with strict mode E_STRICT
|
||||
$conf = new stdClass(); // instantiate $conf explicitely
|
||||
$conf->global = (object) array();
|
||||
$conf->file = (object) array();
|
||||
$conf->db = (object) array();
|
||||
$conf->syslog = (object) array();
|
||||
$conf->global = new stdClass();
|
||||
$conf->file = new stdClass();
|
||||
$conf->db = new stdClass();
|
||||
$conf->syslog = new stdClass();
|
||||
|
||||
// Force $_REQUEST["logtohtml"]
|
||||
$_REQUEST["logtohtml"]=1;
|
||||
|
||||
@ -177,7 +177,7 @@ function paypaladmin_prepare_head()
|
||||
$head[$h][2] = 'paypalaccount';
|
||||
$h++;
|
||||
|
||||
$object=(object) array();
|
||||
$object=new stdClass();
|
||||
|
||||
// Show more tabs from modules
|
||||
// Entries must be declared in modules descriptor with line
|
||||
|
||||
@ -2571,7 +2571,7 @@ class Product extends CommonObject
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $this->db->fetch_object($result);
|
||||
$this->stock_warehouse[$row->fk_entrepot] = (object) array();
|
||||
$this->stock_warehouse[$row->fk_entrepot] = new stdClass();
|
||||
$this->stock_warehouse[$row->fk_entrepot]->real = $row->reel;
|
||||
$this->stock_warehouse[$row->fk_entrepot]->pmp = $row->pmp;
|
||||
$this->stock_reel+=$row->reel;
|
||||
|
||||
@ -551,7 +551,7 @@ class Task extends CommonObject
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$tasks[$i] = (object) array();
|
||||
$tasks[$i] = new stdClass();
|
||||
$tasks[$i]->id = $obj->taskid;
|
||||
$tasks[$i]->ref = $obj->taskid;
|
||||
$tasks[$i]->fk_project = $obj->projectid;
|
||||
|
||||
@ -66,7 +66,7 @@ $demoprofiles=array(
|
||||
|
||||
$tmpaction = 'view';
|
||||
$parameters=array();
|
||||
$object=(object) 'nothing';
|
||||
$object=new stdClass();
|
||||
$reshook=$hookmanager->executeHooks('addDemoProfile', $parameters, $object, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
||||
$error=$hookmanager->error; $errors=$hookmanager->errors;
|
||||
|
||||
|
||||
@ -136,7 +136,7 @@ if ($PAYPALTOKEN)
|
||||
$ack = strtoupper($resArray["ACK"]);
|
||||
if($ack=="SUCCESS" || $ack=="SUCCESSWITHWARNING")
|
||||
{
|
||||
$object = (object) 'paypal';
|
||||
$object = new stdClass();
|
||||
|
||||
$object->source = $source;
|
||||
$object->ref = $ref;
|
||||
|
||||
@ -45,10 +45,10 @@ require_once ADODB_PATH.'adodb-time.inc.php';
|
||||
|
||||
// Avoid warnings with strict mode E_STRICT
|
||||
$conf = new stdClass(); // instantiate $conf explicitely
|
||||
$conf->global = (object) array();
|
||||
$conf->file = (object) array();
|
||||
$conf->db = (object) array();
|
||||
$conf->syslog = (object) array();
|
||||
$conf->global = new stdClass();
|
||||
$conf->file = new stdClass();
|
||||
$conf->db = new stdClass();
|
||||
$conf->syslog = new stdClass();
|
||||
|
||||
// Force $_REQUEST["logtohtml"]
|
||||
$_REQUEST["logtohtml"]=1;
|
||||
|
||||
@ -112,11 +112,11 @@ class User extends CommonObject
|
||||
$this->all_permissions_are_loaded = 0;
|
||||
$this->admin=0;
|
||||
|
||||
$this->conf = (object) array();
|
||||
$this->rights = (object) array();
|
||||
$this->rights->user = (object) array();
|
||||
$this->rights->user->user = (object) array();
|
||||
$this->rights->user->self = (object) array();
|
||||
$this->conf = new stdClass();
|
||||
$this->rights = new stdClass();
|
||||
$this->rights->user = new stdClass();
|
||||
$this->rights->user->user = new stdClass();
|
||||
$this->rights->user->self = new stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -538,11 +538,11 @@ class User extends CommonObject
|
||||
|
||||
if ($perms)
|
||||
{
|
||||
if (! isset($this->rights) || ! is_object($this->rights)) $this->rights = (object) array(); // For avoid error
|
||||
if (! isset($this->rights->$module) || ! is_object($this->rights->$module)) $this->rights->$module = (object) array();
|
||||
if (! isset($this->rights) || ! is_object($this->rights)) $this->rights = new stdClass(); // For avoid error
|
||||
if (! isset($this->rights->$module) || ! is_object($this->rights->$module)) $this->rights->$module = new stdClass();
|
||||
if ($subperms)
|
||||
{
|
||||
if (! isset($this->rights->$module->$perms) || ! is_object($this->rights->$module->$perms)) $this->rights->$module->$perms = (object) array();
|
||||
if (! isset($this->rights->$module->$perms) || ! is_object($this->rights->$module->$perms)) $this->rights->$module->$perms = new stdClass();
|
||||
$this->rights->$module->$perms->$subperms = 1;
|
||||
}
|
||||
else
|
||||
@ -588,11 +588,11 @@ class User extends CommonObject
|
||||
|
||||
if ($perms)
|
||||
{
|
||||
if (! isset($this->rights) || ! is_object($this->rights)) $this->rights = (object) array(); // For avoid error
|
||||
if (! isset($this->rights->$module) || ! is_object($this->rights->$module)) $this->rights->$module = (object) array();
|
||||
if (! isset($this->rights) || ! is_object($this->rights)) $this->rights = new stdClass(); // For avoid error
|
||||
if (! isset($this->rights->$module) || ! is_object($this->rights->$module)) $this->rights->$module = new stdClass();
|
||||
if ($subperms)
|
||||
{
|
||||
if (! isset($this->rights->$module->$perms) || ! is_object($this->rights->$module->$perms)) $this->rights->$module->$perms = (object) array();
|
||||
if (! isset($this->rights->$module->$perms) || ! is_object($this->rights->$module->$perms)) $this->rights->$module->$perms = new stdClass();
|
||||
$this->rights->$module->$perms->$subperms = 1;
|
||||
}
|
||||
else
|
||||
|
||||
@ -470,11 +470,11 @@ class UserGroup extends CommonObject
|
||||
|
||||
if ($perms)
|
||||
{
|
||||
if (! isset($this->rights)) $this->rights = (object) array(); // For avoid error
|
||||
if (! isset($this->rights->$module) || ! is_object($this->rights->$module)) $this->rights->$module = (object) array();
|
||||
if (! isset($this->rights)) $this->rights = new stdClass(); // For avoid error
|
||||
if (! isset($this->rights->$module) || ! is_object($this->rights->$module)) $this->rights->$module = new stdClass();
|
||||
if ($subperms)
|
||||
{
|
||||
if (! isset($this->rights->$module->$perms) || ! is_object($this->rights->$module->$perms)) $this->rights->$module->$perms = (object) array();
|
||||
if (! isset($this->rights->$module->$perms) || ! is_object($this->rights->$module->$perms)) $this->rights->$module->$perms = new stdClass();
|
||||
$this->rights->$module->$perms->$subperms = 1;
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user