diff --git a/modules/ldap/lib/Auth/Process/AttributeAddFromLDAP.php b/modules/ldap/lib/Auth/Process/AttributeAddFromLDAP.php
index 516e2630d762e31bcc46a75400575df0e142d45b..e788d268906f944afddb984aa30d039c405d754a 100644
--- a/modules/ldap/lib/Auth/Process/AttributeAddFromLDAP.php
+++ b/modules/ldap/lib/Auth/Process/AttributeAddFromLDAP.php
@@ -36,9 +36,9 @@ class sspmod_ldap_Auth_Process_AttributeAddFromLDAP extends sspmod_ldap_Auth_Pro
 {
 
     /**
-     * LDAP attribute to add to the request attributes
+     * LDAP attributes to add to the request attributes
      *
-     * @var string
+     * @var array
      */
     protected $search_attributes;
 
@@ -143,8 +143,9 @@ class sspmod_ldap_Auth_Process_AttributeAddFromLDAP extends sspmod_ldap_Auth_Pro
         $attributes =& $request['Attributes'];
 
         // perform a merge on the ldap_search_filter
-
         // loop over the attributes and build the search and replace arrays
+        $arrSearch = array();
+        $arrReplace = array();
         foreach ($attributes as $attr => $val) {
             $arrSearch[] = '%'.$attr.'%';