Skip to content

Commit

Permalink
No longer use filter_ functions and deprecated `FILTER_SANITIZE_STR…
Browse files Browse the repository at this point in the history
…ING`.
  • Loading branch information
remcotolsma committed Dec 9, 2022
1 parent dff0dc2 commit 58cb81a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PaymentMethodSelectFieldType.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,11 @@ public function import_options() {
return;
}

if ( ! filter_has_var( INPUT_POST, 'field_id' ) ) {
if ( ! \array_key_exists( 'field_id', $_POST ) ) {
return;
}

$field_id = filter_input( INPUT_POST, 'field_id', FILTER_SANITIZE_STRING );
$field_id = \sanitize_text_field( \wp_unslash( $_POST['field_id'] ) );

$field = FrmField::getOne( $field_id );

Expand Down

0 comments on commit 58cb81a

Please sign in to comment.