Missing argument error when wp_login() is called – I have a fix…
-
On some of our WordPress sites (those using an Active Directory plugin to replace standard WordPress logins), we’re seeing this warning message:
PHP Warning: Missing argument 2 for org\\lecklider\\charles\\wordpress\\wp_fail2ban\\wp_login() in web_tree_path_redacted/wp-content/plugins/wp-fail2ban/wp-fail2ban.php on line 271
If you look at line 271, it’s the function wp_login() that apparently takes two parameters, but the second one ($user) isn’t used from what I can tell. My guess is that wp_login() is being called somehow with one parameter, so a simple change to default $user to ” in that case seemed to fix it:
function wp_login($user_login, $user = ”)
It would nice if this change could go into the next release of WP fail2ban (at the moment, I’m auto-patching this fix to the plugin, which isn’t ideal).
- The topic ‘Missing argument error when wp_login() is called – I have a fix…’ is closed to new replies.