Skip to content
Snippets Groups Projects
Verified Commit 8266e545 authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

fix: allow TextFieldSanitizer process array values

parent 4a0aa3ca
Branches
Tags
3 merge requests!28release: 3.0.0,!25fix: allow TextFieldSanitizer process array values,!19Add strong typing for 3.0 version
Pipeline #6557 passed
# Changelog # Changelog
## [2.4.11]
### Changed
- Allow TextFieldSanitizer to process array values
## [2.4.10] - 2021-10-01 ## [2.4.10] - 2021-10-01
### Changed ### Changed
- Render form data without using echo - Render form data without using echo
......
...@@ -6,6 +6,9 @@ use WPDesk\Forms\Sanitizer; ...@@ -6,6 +6,9 @@ use WPDesk\Forms\Sanitizer;
class TextFieldSanitizer implements Sanitizer { class TextFieldSanitizer implements Sanitizer {
public function sanitize( $value ) { public function sanitize( $value ) {
if ( is_array( $value ) ) {
return array_map('sanitize_text_field', $value);
}
return sanitize_text_field( $value ); return sanitize_text_field( $value );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment