REST API: Use a strict in_array()
check in WP_REST_Meta_Fields::get_registered_fields()
.
Props dkarfa. Fixes #48839. git-svn-id: https://develop.svn.wordpress.org/trunk@46802 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
890bd870e8
commit
d50f672908
@ -435,7 +435,7 @@ abstract class WP_REST_Meta_Fields {
|
||||
|
||||
$rest_args['schema'] = $this->default_additional_properties_to_false( $rest_args['schema'] );
|
||||
|
||||
if ( ! in_array( $type, array( 'string', 'boolean', 'integer', 'number', 'array', 'object' ) ) ) {
|
||||
if ( ! in_array( $type, array( 'string', 'boolean', 'integer', 'number', 'array', 'object' ), true ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user