From 8c1b36bb9fa95ff028ce777f1725f865fbdb36fa Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <machniak@kolabsys.com>
Date: Sat, 31 Jul 2021 17:33:42 +0200
Subject: [PATCH] Fix PHP 8.1 deprecation warnings

---
 lib/Net/LDAP3/Result.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/Net/LDAP3/Result.php b/lib/Net/LDAP3/Result.php
index ef57cc8..8ee788a 100644
--- a/lib/Net/LDAP3/Result.php
+++ b/lib/Net/LDAP3/Result.php
@@ -147,6 +147,7 @@ class Net_LDAP3_Result implements Iterator
 
     /***  Implement PHP 5 Iterator interface to make foreach work  ***/
 
+    #[ReturnTypeWillChange]
     function current()
     {
         $attrib       = ldap_get_attributes($this->conn, $this->current);
@@ -155,25 +156,29 @@ class Net_LDAP3_Result implements Iterator
         return $attrib;
     }
 
+    #[ReturnTypeWillChange]
     function key()
     {
         return $this->iteratorkey;
     }
 
+    #[ReturnTypeWillChange]
     function rewind()
     {
         $this->iteratorkey = 0;
         $this->current = ldap_first_entry($this->conn, $this->result);
     }
 
+    #[ReturnTypeWillChange]
     function next()
     {
         $this->iteratorkey++;
         $this->current = ldap_next_entry($this->conn, $this->current);
     }
 
+    #[ReturnTypeWillChange]
     function valid()
     {
-        return (bool)$this->current;
+        return (bool) $this->current;
     }
 }
-- 
GitLab