Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Prevent PHP errors when notification data is malformed.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public static function register_rest_endpoints() {
'type' => 'string',
),
'sanitize_callback' => function ( $param ) {
if ( ! is_array( $param ) ) {
return array();
}
return array_map( 'sanitize_text_field', $param );
},
),
Expand Down
Loading