From 8c5ecf28cc8f8ceb6a3f16ee2339a6fe2b4bff11 Mon Sep 17 00:00:00 2001 From: XavRsl Date: Fri, 19 Sep 2014 17:39:05 +0200 Subject: [PATCH] Undefined index bug corrected --- src/Xavrsl/Ldap/Directory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Xavrsl/Ldap/Directory.php b/src/Xavrsl/Ldap/Directory.php index c0c5c6d..69199be 100644 --- a/src/Xavrsl/Ldap/Directory.php +++ b/src/Xavrsl/Ldap/Directory.php @@ -455,7 +455,7 @@ protected function output() { } elseif(count($this->results) == 1 && count($this->attributes) > 1) { $output = array(); - $u = $this->results[0]; + $u = reset($this->results); foreach($this->attributes as $a){ $output[$a] = array_key_exists($a, $u) ? $this->format($u[$a]) : null; }