adldap / adLDAP

adLDAP is a PHP class that provides LDAP authentication and integration with Active Directory.
GNU Lesser General Public License v2.1
424 stars 204 forks source link

PHP Error - Trying to get some infoCollection() result propeties #103

Open alexxsg opened 8 years ago

alexxsg commented 8 years ago

When trying to get some properties, such as "dn", returned by the "public function __get($attribute)", i got an PHP parse error like:

[error] 1008#0: *33 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected T_ELSE, expecting T_FUNCTION in collections/adLDAPCollection.php on line 108

Fixed adding below lines in "public function __get($attribute)", after line 93:

else {
                      if(!empty($this->info[0][strtolower($attribute)])){
                        return $this->info[0][strtolower($attribute)];   
                      }else{