From 486bf504138d2532364c8ab08e8017c8eddda06d Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Wed, 20 Nov 2019 17:45:32 +0100 Subject: [PATCH] MDL-67316 ldap: Pass correct hex chars to hexdec() Before php74 they were silently discarded, now they show a deprecation message. --- lib/ldaplib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ldaplib.php b/lib/ldaplib.php index 78923c7f131..2da0f1529a5 100644 --- a/lib/ldaplib.php +++ b/lib/ldaplib.php @@ -448,7 +448,7 @@ function ldap_stripslashes($text) { $text = preg_replace_callback($quoted, function ($match) use ($specialchars) { if (ctype_xdigit(ltrim($match[1], '\\'))) { - return chr(hexdec($match[1])); + return chr(hexdec(ltrim($match[1], '\\'))); } else { return str_replace($specialchars[LDAP_DN_SPECIAL_CHARS_QUOTED_ALPHA], $specialchars[LDAP_DN_SPECIAL_CHARS],