| @@ -10,9 +10,9 @@ | ||
| 10 | 10 | $post_data = defender_get_data_from_request( null, 'p' ); |
| 11 | 11 | if ( isset( $post_data['pass1'], $post_data['pass2'] ) && $post_data['pass1'] !== $post_data['pass2'] ) { |
| 12 | 12 | $error_object->add( 'password_reset_mismatch', esc_html__( 'The passwords do not match.', 'defender-security' ) ); |
| 13 | 13 | } |
| 14 | -if ( ( ! $error_object->has_errors() ) && ! empty( $post_data['pass1'] ) ) { | |
| 14 | +if ( ( ! $error_object->has_errors() ) && isset( $post_data['pass1'] ) && is_string( $post_data['pass1'] ) && '' !== trim( $post_data['pass1'] ) ) { | |
| 15 | 15 | reset_password( $user, $post_data['pass1'] ); |
| 16 | 16 | login_header( |
| 17 | 17 | esc_html__( 'Password Reset', 'defender-security' ), |
| 18 | 18 | sprintf( |