Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ensure edd_first and edd_last are not empty

  • Loading branch information...
commit 83d72c217fa0c63a9259bf22153577a5c67db281 1 parent b0d5aa7
Pippin Williamson authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 includes/process-purchase.php
4 includes/process-purchase.php
View
@@ -298,8 +298,8 @@ function edd_purchase_form_validate_logged_in_user() {
$valid_user_data = array(
'user_id' => $user_ID,
'user_email' => sanitize_email( $_POST['edd_email'] ),
- 'user_first' => sanitize_text_field( $_POST['edd_first'] ),
- 'user_last' => sanitize_text_field( $_POST['edd_last'] ),
+ 'user_first' => ! empty( $_POST['edd_first'] ) ? sanitize_text_field( $_POST['edd_first'] ) : '',
+ 'user_last' => ! empty( $_POST['edd_last'] ) ? sanitize_text_field( $_POST['edd_last'] ) : '',
);
} else {
// Set invalid user error
Please sign in to comment.
Something went wrong with that request. Please try again.