clifgriffin / simple-ldap-login

Integrate WordPress logins with LDAP. Simply.
63 stars 56 forks source link

PHP Warning on preg_replace() #43

Open pjohanneson opened 7 years ago

pjohanneson commented 7 years ago

Lately I've been seeing the following warning on a test server with WP_DEBUG turned on:

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in [...]/wp-content/plugins/simple-ldap-login/includes/adLDAP.php on line 2687

I'm unable to log in because the warning causes the headers to abort.

Turning off WP_DEBUG_DISPLAY allows me to log in, but I would prefer to know that my LDAP plugin wasn't throwing deprecation warnings.

jpuck commented 7 years ago

In deed, this was deprecated in PHP 5.5 and emits a warning in 7.0. Currently, the /e flag is ignored, so the fix should be a straight-forward removal if functionality is still working anyway. YMMV

https://secure.php.net/manual/en/function.preg-replace.php#refsect1-function.preg-replace-changelog

lofidevops commented 7 years ago

See https://github.com/clifgriffin/simple-ldap-login/pull/42 (waiting to merge)