From 7995998e0da526102217efc5edd9ad475646efde Mon Sep 17 00:00:00 2001 From: Michael Munger Date: Thu, 8 Dec 2016 21:15:18 -0500 Subject: [PATCH] Fixed a bug. In Entry::applyExtraAttributes(), the class will falsely attempt to apply attributes that do not exist resulting in a number of PHP errors. An if isset() condition was added to skip the attemtpt to add it to the data[] array if the array element in question does not exist. --- src/Objects/Ldap/Entry.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Objects/Ldap/Entry.php b/src/Objects/Ldap/Entry.php index d21da38..894772f 100644 --- a/src/Objects/Ldap/Entry.php +++ b/src/Objects/Ldap/Entry.php @@ -49,7 +49,7 @@ private function applyAttributes($attributes) $data = []; for ($i = 0; $i <= $attributes[$key]['count']; $i++) { - $data[] = $attributes[$key][$i]; + if(isset($attributes[$key][$i])) $data[] = $attributes[$key][$i]; } $this->setAttribute($key, array_filter($data));