From e62bb4da1334e40c5cf1627712d23a43baecb0a1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 23 Sep 2015 00:09:32 +0200 Subject: [PATCH] Make parameter required --- htdocs/societe/class/societe.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 81698196f20..30b696bb8ef 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -419,7 +419,7 @@ class Societe extends CommonObject * @param User $user Object of user that ask creation * @return int >= 0 if OK, < 0 if KO */ - function create($user='') + function create($user) { global $langs,$conf; @@ -484,7 +484,7 @@ class Societe extends CommonObject $this->add_commercial($user, $this->commercial_id); } // si un commercial cree un client il lui est affecte automatiquement - else if (!$user->rights->societe->client->voir) + else if (empty($user->rights->societe->client->voir)) { $this->add_commercial($user, $user->id); }