From b82be6e47bbcfd7c16123f7ae2d1c85dc1bf7ecb Mon Sep 17 00:00:00 2001 From: Jean-Philippe Metivier <jean-philippe.metivier@unicaen.fr> Date: Wed, 12 Apr 2023 11:20:49 +0200 Subject: [PATCH] curly et argument excedentaire --- src/UnicaenLdap/Entity/Base/People.php | 4 ++-- src/UnicaenLdap/Service/AbstractService.php | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/UnicaenLdap/Entity/Base/People.php b/src/UnicaenLdap/Entity/Base/People.php index 2a4c390..5170c27 100644 --- a/src/UnicaenLdap/Entity/Base/People.php +++ b/src/UnicaenLdap/Entity/Base/People.php @@ -2215,7 +2215,7 @@ class People extends Entity $uni = ''; $value = (string)$value; for ($i = 0; $i < strlen($value); $i++) { - $a = ord($value{$i}) << 8; + $a = ord($value[$i]) << 8; $uni .= sprintf('%X', $a); } $nthash = hash("md4", pack('H*', $uni), true); @@ -2238,7 +2238,7 @@ class People extends Entity $uni = ''; $value = (string)$value; for ($i = 0; $i < strlen($value); $i++) { - $a = ord($value{$i}) << 8; + $a = ord($value[$i]) << 8; $uni .= sprintf('%X', $a); } $nthash = hash("md4", pack('H*', $uni), true); diff --git a/src/UnicaenLdap/Service/AbstractService.php b/src/UnicaenLdap/Service/AbstractService.php index a741996..55eb49d 100644 --- a/src/UnicaenLdap/Service/AbstractService.php +++ b/src/UnicaenLdap/Service/AbstractService.php @@ -337,7 +337,7 @@ abstract class AbstractService implements $berIdentifier = null; $name = ldap_first_attribute( - $resource, $entry, $berIdentifier + $resource, $entry//, $berIdentifier ); $attributes = array(); @@ -359,8 +359,7 @@ abstract class AbstractService implements $attributes[$attrName] = $data; $name = ldap_next_attribute( - $resource, $entry, - $berIdentifier + $resource, $entry//, $berIdentifier ); } ksort($attributes, SORT_LOCALE_STRING); -- GitLab