1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
From: Guilhem Moulin <guilhem@debian.org>
Date: Thu, 30 Jan 2025 00:24:49 +0100
Subject: Port to php-ldap 8.4
PHP 8.3.16 and 8.4.3 modified a check to makes sure that for some LDAP
operations the array of values is a "numerically indexed array":
https://github.com/php/php-src/commit/f90323c8d4456ff2b9a0f442f6a383d9b58185ae
This was a fix for https://github.com/php/php-src/issues/17280 .
However as mentioned in https://github.com/DirectoryTree/LdapRecord/issues/753
this can cause regressions.
We change Net_LDAP2_Entry::getValue() to return lists not associative
arrays for multivariate attributes.
Bug-Debian: https://bugs.debian.org/1094659
---
Net/LDAP2/Entry.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Net/LDAP2/Entry.php b/Net/LDAP2/Entry.php
index 0008eaa..b58dc6c 100644
--- a/Net/LDAP2/Entry.php
+++ b/Net/LDAP2/Entry.php
@@ -486,10 +486,10 @@ class Net_LDAP2_Entry extends PEAR
$value = $this->_attributes[$attr][0];
break;
case 'all':
- $value = $this->_attributes[$attr];
+ $value = array_values($this->_attributes[$attr]);
break;
default:
- $value = $this->_attributes[$attr];
+ $value = array_values($this->_attributes[$attr]);
if (count($value) == 1) {
$value = array_shift($value);
}
|