From 28265c8254ec70b078ed010d370dedecced3fd36 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <machniak@kolabsys.com>
Date: Thu, 11 Nov 2021 10:02:26 +0100
Subject: [PATCH] Fix an undefined index warning

---
 lib/Net/LDAP3.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php
index 74224c1..0d3c875 100644
--- a/lib/Net/LDAP3.php
+++ b/lib/Net/LDAP3.php
@@ -2372,7 +2372,7 @@ class Net_LDAP3
         if (is_array($attributes['rename']) && !empty($attributes['rename'])) {
             $olddn      = $attributes['rename']['dn'];
             $newrdn     = $attributes['rename']['new_rdn'];
-            $new_parent = $attributes['rename']['new_parent'];
+            $new_parent = isset($attributes['rename']['new_parent']) ? $attributes['rename']['new_parent'] : null;
 
             $this->_debug("C: Rename $olddn to $newrdn,$new_parent");
 
-- 
GitLab