diff options
Diffstat (limited to 'Postman/PostmanAjaxController.php')
-rw-r--r-- | Postman/PostmanAjaxController.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Postman/PostmanAjaxController.php b/Postman/PostmanAjaxController.php index 16d70cc..ad63464 100644 --- a/Postman/PostmanAjaxController.php +++ b/Postman/PostmanAjaxController.php @@ -49,9 +49,16 @@ if (! class_exists ( 'PostmanAbstractAjaxHandler' )) { */ protected function getRequestParameter($parameterName) { if (isset ( $_POST [$parameterName] )) { - $value = sanitize_text_field($_POST[$parameterName]); + if ( is_array($_POST [$parameterName] ) ) { + array_walk_recursive( $_POST [$parameterName], 'sanitize_text_field' ); + $value = $_POST [$parameterName]; + } else { + $value = sanitize_text_field($_POST[$parameterName]); + } + $this->logger->trace ( sprintf ( 'Found parameter "%s"', $parameterName ) ); $this->logger->trace ( $value ); + return $value; } } |