Return empty array if no values are $_POST'ed to the form

Fixes an issue with tests + null values in logs
This commit is contained in:
Kelly Dwan 2019-11-15 11:54:56 -05:00
parent 68d5c53c95
commit a2a88c56a4
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D

View file

@ -354,7 +354,12 @@ function get_form_submission() {
)
);
return filter_input_array( INPUT_POST, $input_filters );
$result = filter_input_array( INPUT_POST, $input_filters );
if ( ! $result ) {
return [];
}
return $result;
}
/**