mirror of
https://github.com/moodle/moodle.git
synced 2025-07-25 00:02:18 +02:00
MDL-67316 ldap: Pass correct hex chars to hexdec()
Before php74 they were silently discarded, now they show a deprecation message.
This commit is contained in:
@@ -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],
|
||||
|
Reference in New Issue
Block a user