You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just wanted to document this fix because I know it can be annoying when testing/debugging. For those of you that are trying to use the older adLDAP library with newer versions of PHP, the following warning will often occur.
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in lib\adLDAP\classes\adLDAPUtils.php on line 105
To fix this, navigate to the adLDAP\classes\adLDAPUtils.php file and modify the following:
Line: 102
public function ldapSlashes($str){
return preg_replace('/([\x00-\x1F\*\(\)\\\\])/e',
'"\\\\\".join("",unpack("H2","$1"))',
$str);
}
Change to this:
public function ldapSlashes($str){
return preg_replace_callback('/([\x00-\x1F\*\(\)\\\\])/',
function($matches) {
foreach($matches as $match) {
return join("", unpack("H2","$1"));
}
}, $str
);
}
The text was updated successfully, but these errors were encountered:
I just wanted to document this fix because I know it can be annoying when testing/debugging. For those of you that are trying to use the older adLDAP library with newer versions of PHP, the following warning will often occur.
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in lib\adLDAP\classes\adLDAPUtils.php on line 105
To fix this, navigate to the adLDAP\classes\adLDAPUtils.php file and modify the following:
Line: 102
Change to this:
The text was updated successfully, but these errors were encountered: