im working on Wordpress Plugins. The review team form the WP Plugin directory requires that every get or post value is sanitizes trhough the WP functions before first access.
Usually i check if a value is given by the isset() function which now is not possible due the above requirement.
My solution for now is doing something like
$foo = isset( sanitize_text_field( $_POST['foo'] ?? '' )) ? sanitize_text_field($_POST['foo']) : $something
But this causes some ohter side effects and isnt the most elegant solution, so i was wondering if anybody has an better idea to go about this?
Thank you.