Var not declared

This commit is contained in:
Laurent Destailleur 2015-03-17 10:38:25 +01:00
parent a73ff524e5
commit bfd979224f

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -25,11 +25,12 @@
*/ */
/** /**
* \class Ldap * Class to manage LDAP features
* \brief Class to manage LDAP features
*/ */
class Ldap class Ldap
{ {
var $error;
/** /**
* Tableau des serveurs (IP addresses ou nom d'hotes) * Tableau des serveurs (IP addresses ou nom d'hotes)
*/ */
@ -78,7 +79,7 @@ class Ldap
var $name; var $name;
var $firstname; var $firstname;
var $login; var $login;
var $phone; var $phone;
var $skype; var $skype;
var $fax; var $fax;
var $mail; var $mail;
@ -414,9 +415,10 @@ class Ldap
} }
else else
{ {
$this->error=@ldap_error($this->connection); $this->ldapErrorCode = @ldap_errno($this->connection);
$this->errno=@ldap_errno($this->connection); $this->ldapErrorText = @ldap_error($this->connection);
dol_syslog(get_class($this)."::add failed: ".$this->errno." ".$this->error, LOG_ERR); $this->error=$this->ldapErrorCode." ".$this->ldapErrorText;
dol_syslog(get_class($this)."::add failed: ".$this->error, LOG_ERR);
return -1; return -1;
} }
} }