From d4ba01327224343bba23ed7ab3164fdf9ad55c88 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <machniak@kolabsys.com>
Date: Fri, 2 Jun 2023 14:55:01 +0200
Subject: [PATCH] Fix PHP8 warnings

---
 lib/Net/LDAP3.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php
index e0ee15c..fd45081 100644
--- a/lib/Net/LDAP3.php
+++ b/lib/Net/LDAP3.php
@@ -91,6 +91,7 @@ class Net_LDAP3
         'sizelimit'      => 0,
         'timelimit'      => 0,
         'config_root_dn' => 'cn=config',
+        'vlv'            => null,
     );
 
     protected $debug_level = false;
@@ -740,7 +741,9 @@ class Net_LDAP3
                 );
 
                 foreach (array('aclrights', 'attributelevelrights', 'entrylevelrights') as $attr_name) {
-                    if ($attr_value = $result[$attr_name]) {
+                    if (!empty($result[$attr_name])) {
+                        $attr_value = $result[$attr_name];
+
                         switch ($attr_name) {
                         case 'aclrights':
                             $this->parse_aclrights($attributes, $attr_value);
-- 
GitLab