diff --git a/src/Admin/Settings.php b/src/Admin/Settings.php index f4e1a22..96c5c89 100644 --- a/src/Admin/Settings.php +++ b/src/Admin/Settings.php @@ -148,8 +148,7 @@ public function graphql_types_ajax_callback(): void { wp_send_json( __( 'No form data.', 'wp-graphql-acf' ) ); } - // @phpstan-ignore-next-line - if ( empty( $_POST['nonce'] ) || ! wp_verify_nonce( filter_input( INPUT_POST, 'nonce', FILTER_SANITIZE_STRING ), 'wp_graphql_acf' ) ) { + if ( empty( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( $_POST['nonce'] ), 'wp_graphql_acf' ) ) { wp_send_json_error(); }