Fix issue with card update when no previous card

This commit is contained in:
nikolark committed 2015-08-08 12:49:54 +02:00
1 parent 0d2e0dc752
commit 7170728177
2 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -76,7 +76,7 @@ if($_SERVER['REQUEST_METHOD'] === 'POST') {
return_json_response(array('error' => "User with user_id '".$data['user_id']."' does not exist."), 400);
}
$user = $user_data[0];
$active_card_number = get_active_card_number($user);
$active_card_number = get_active_card_number($user['cards']);
/* If card number is attached to specified user, bail */
if($active_card_number && $active_card_number === $data['card_number']) {