diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php
index 66f74e7fd16e616e4eef2252728167e3b7f4b597..39773b18db7190e1c8c0bdff1ee7a8e0707b111f 100644
--- a/lib/Net/LDAP3.php
+++ b/lib/Net/LDAP3.php
@@ -7,7 +7,7 @@
  | Based on code created by the Roundcube Webmail team.                  |
  |                                                                       |
  | Copyright (C) 2006-2014, The Roundcube Dev Team                       |
- | Copyright (C) 2012-2019, Kolab Systems AG                             |
+ | Copyright (C) 2012-2014, Kolab Systems AG                             |
  |                                                                       |
  | 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  |
@@ -278,20 +278,24 @@ class Net_LDAP3
             $ldap->connect();
             $ldap->bind($this->_current_bind_dn, $this->_current_bind_pw);
 
-            $replica_attrs = array(
+            $attrs = array(
+                'nsDS5ReplicaBindDN',
+                'nsDS5ReplicaType',
+                'nsds5ReplicaPurgeDelay',
+                'nsDS5Flags'
+            );
+
+            $replica_attrs = $ldap->get_entry_attributes($replica_dn, $attrs);
+            $replica_attrs = array_merge((array) $replica_attrs, array(
                 'cn' => 'replica',
                 'objectclass' => array(
                     'top',
                     'nsds5replica',
                     'extensibleobject',
                 ),
-                'nsDS5ReplicaBindDN'     => $ldap->get_entry_attribute($replica_dn, "nsDS5ReplicaBindDN"),
-                'nsDS5ReplicaId'         => ($max_repl_id + $num + 1),
-                'nsDS5ReplicaRoot'       => $domain_root_dn,
-                'nsDS5ReplicaType'       => $ldap->get_entry_attribute($replica_dn, "nsDS5ReplicaType"),
-                'nsds5ReplicaPurgeDelay' => $ldap->get_entry_attribute($replica_dn, "nsds5ReplicaPurgeDelay"),
-                'nsDS5Flags'             => $ldap->get_entry_attribute($replica_dn, "nsDS5Flags")
-            );
+                'nsDS5ReplicaId'   => ($max_repl_id + $num + 1),
+                'nsDS5ReplicaRoot' => $domain_root_dn,
+            ));
 
             $new_replica_dn = 'cn=replica,cn="' . $domain_root_dn . '",cn=mapping tree,cn=config';