From bfd979224fdbd3ae2b8e2d0482657bb017ab223b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 Mar 2015 10:38:25 +0100 Subject: [PATCH] Var not declared --- htdocs/core/class/ldap.class.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index ca0cbab3925..2783c55ee03 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2011 Regis Houssin - * Copyright (C) 2006-2011 Laurent Destailleur + * Copyright (C) 2006-2015 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,11 +25,12 @@ */ /** - * \class Ldap - * \brief Class to manage LDAP features + * Class to manage LDAP features */ class Ldap { + var $error; + /** * Tableau des serveurs (IP addresses ou nom d'hotes) */ @@ -78,7 +79,7 @@ class Ldap var $name; var $firstname; var $login; - var $phone; + var $phone; var $skype; var $fax; var $mail; @@ -414,9 +415,10 @@ class Ldap } else { - $this->error=@ldap_error($this->connection); - $this->errno=@ldap_errno($this->connection); - dol_syslog(get_class($this)."::add failed: ".$this->errno." ".$this->error, LOG_ERR); + $this->ldapErrorCode = @ldap_errno($this->connection); + $this->ldapErrorText = @ldap_error($this->connection); + $this->error=$this->ldapErrorCode." ".$this->ldapErrorText; + dol_syslog(get_class($this)."::add failed: ".$this->error, LOG_ERR); return -1; } }