Skip to content

Commit

Permalink
Validate third field is set.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwilsoncc committed Mar 5, 2024
1 parent 2e41904 commit 811fabc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/save.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ function validate_line( $line, $line_number, $has_only_placeholder_records = nul
$exchange = trim( $fields[0] );
$pub_id = trim( $fields[1] );
$account_type = trim( $fields[2] );
$is_placeholder_record = is_placeholder_record( $exchange, $pub_id, $account_type, $fields[3] ? trim( $fields[3] ) : null );
$tag_id = ! empty( $fields[3] ) ? trim( $fields[3] ) : null;
$is_placeholder_record = is_placeholder_record( $exchange, $pub_id, $account_type, $tag_id );

// If the file contains placeholder record and no placeholder was already present, set variable.
if ( $is_placeholder_record && is_null( $has_only_placeholder_records ) ) {
Expand Down

0 comments on commit 811fabc

Please sign in to comment.