Skip to content

Commit ab83cf7

Browse files
REST API: Remove unnecessary checks for data type
1 parent a13dc85 commit ab83cf7

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/wp-includes/rest-api.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,6 @@ function rest_sanitize_schema_properties( $data, $server, $request ) {
238238
* @return array|object The sanitized schema data.
239239
*/
240240
function rest_sanitize_schema_properties_recursive( $data ) {
241-
if ( ! is_array( $data ) && ! is_object( $data ) ) {
242-
return $data;
243-
}
244-
245241
$is_object = is_object( $data );
246242
$data_array = $is_object ? (array) $data : $data;
247243

0 commit comments

Comments
 (0)