PluginProbe
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards / 5.5.84
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards v5.5.84
5.5.84 5.5.83 5.5.82 5.5.81 5.5.80 5.5.79 5.5.77 5.5.76 5.5.75 5.5.73 5.5.72 5.5.22 5.5.23 5.5.29 5.5.3 5.5.31 5.5.32 5.5.34 5.5.35 5.5.36 5.5.37 5.5.4 5.5.40 5.5.41 5.5.42 All 160 releases
← All changes | WPDataAccess/API/WPDA_API_Core.php +11 -9 5.5.815.5.84 View file →
@@ -455,18 +455,20 @@
455 455 'type' => 'array',
456 456 'description' => __( 'Cron job parameters', 'wp-data-access' ),
457 457 'sanitize_callback' => function ( $param ) {
458 458 $params = array();
459 - foreach ( $param as $key => $value ) {
460 - if ( 'params' === $key || 'notify' === $key ) {
461 - // Sanitize custom parameters
462 - $custom_params = array();
463 - foreach ( $value as $param_key => $param_value ) {
464 - $custom_params[sanitize_text_field( $param_key )] = sanitize_text_field( $param_value );
459 + if ( is_array( $param ) ) {
460 + foreach ( $param as $key => $value ) {
461 + if ( 'params' === $key || 'notify' === $key ) {
462 + // Sanitize custom parameters
463 + $custom_params = array();
464 + foreach ( $value as $param_key => $param_value ) {
465 + $custom_params[sanitize_text_field( $param_key )] = sanitize_text_field( $param_value );
466 + }
467 + $params[sanitize_text_field( $key )] = $custom_params;
468 + } else {
469 + $params[sanitize_text_field( $key )] = sanitize_text_field( $value );
465 470 }
466 - $params[sanitize_text_field( $key )] = $custom_params;
467 - } else {
468 - $params[sanitize_text_field( $key )] = sanitize_text_field( $value );
469 471 }
470 472 }
471 473 return $params;
472 474 },