Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#37606 closed defect (bug) (duplicate)

WP-Login - Line 784 wp_signon() function

Reported by: kylewlawrence's profile KyleWLawrence Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.5.3
Component: Login and Registration Keywords:
Focuses: administration Cc:

Description

Line 784 of wp-login utilizes the wp_signon() function as so:

	$user = wp_signon( '', $secure_cookie );

However, it should be:

	$user = wp_signon( array(), $secure_cookie );

The current way gives a 500 error on my server to someone trying to login. The second way solves that problem. This is because the wp_signon function wants an array if a variable is passed:

function wp_signon( $credentials = array(), $secure_cookie = '' ) {
	if ( empty($credentials) ) {
		if ( ! empty($_POST['log']) )
			$credentials['user_login'] = $_POST['log'];
		if ( ! empty($_POST['pwd']) )
			$credentials['user_password'] = $_POST['pwd'];
		if ( ! empty($_POST['rememberme']) )
			$credentials['remember'] = $_POST['rememberme'];
	}

	if ( !empty($credentials['remember']) )
		$credentials['remember'] = true;
	else
		$credentials['remember'] = false;

Change History (1)

#1 @ocean90
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hello @KyleWLawrence, welcome to our Trac!

Thanks for your report, this was already fixed in [37697] for #37071.

Note: See TracTickets for help on using tickets.