Meta: Ensure $wp_meta_keys is an array in get_registered_meta_keys().

Props vishalkakadiya.
Fixes #37415, See #35658.


git-svn-id: https://develop.svn.wordpress.org/trunk@38108 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jeremy Felt 2016-07-19 21:58:15 +00:00
parent 3aad67fd48
commit 2a8fd61b0c

View File

@ -1139,7 +1139,7 @@ function unregister_meta_key( $object_type, $meta_key ) {
function get_registered_meta_keys( $object_type ) { function get_registered_meta_keys( $object_type ) {
global $wp_meta_keys; global $wp_meta_keys;
if ( ! isset( $wp_meta_keys[ $object_type ] ) ) { if ( ! is_array( $wp_meta_keys ) || ! isset( $wp_meta_keys[ $object_type ] ) ) {
return array(); return array();
} }