From a4319237f2aafe83dbee7b1796e22e6eb9740ad4 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 19 Jul 2023 10:26:28 +0200 Subject: [PATCH] Fix PHP8 compatibility --- src/includes/class/class.LSattr_ldap_password.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/includes/class/class.LSattr_ldap_password.php b/src/includes/class/class.LSattr_ldap_password.php index ced8516c..98df97ee 100644 --- a/src/includes/class/class.LSattr_ldap_password.php +++ b/src/includes/class/class.LSattr_ldap_password.php @@ -363,10 +363,10 @@ class LSattr_ldap_password extends LSattr_ldap { */ public static function getSalt($length=8) { $pattern = "1234567890abcdefghijklmnopqrstuvwxyz"; - $key = $pattern{rand(0,35)}; + $key = $pattern[rand(0,35)]; for($i=1;$i<$length;$i++) { - $key .= $pattern{rand(0,35)}; + $key .= $pattern[rand(0,35)]; } return $key; }