From 2a8fd61b0cfa071bd47e44f7e17845371ff9f2b7 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Tue, 19 Jul 2016 21:58:15 +0000 Subject: [PATCH] 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 --- src/wp-includes/meta.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/meta.php b/src/wp-includes/meta.php index cd684b6c91..0a8c7bc043 100644 --- a/src/wp-includes/meta.php +++ b/src/wp-includes/meta.php @@ -1139,7 +1139,7 @@ function unregister_meta_key( $object_type, $meta_key ) { function get_registered_meta_keys( $object_type ) { 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(); }