diff --git a/wp-includes/cache.php b/wp-includes/cache.php index ce7184d92..adcfd7e9c 100644 --- a/wp-includes/cache.php +++ b/wp-includes/cache.php @@ -267,7 +267,7 @@ class WP_Object_Cache { if (empty ($group)) $group = 'default'; - if (NULL == $data) + if (NULL === $data) $data = ''; $this->cache[$group][$id] = $data; diff --git a/wp-includes/post.php b/wp-includes/post.php index 2ced5f057..e8366ce90 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1665,6 +1665,13 @@ function update_postmeta_cache($post_ids) { if ( empty( $post_ids ) ) return false; + if ( !is_array($post_ids) ) { + $post_ids = preg_replace('|[^0-9,]|', '', $post_ids); + $post_ids = explode(',', $post_ids); + } + + $post_ids = array_map('intval', $post_ids); + $ids = array(); foreach ( (array) $post_ids as $id ) { if ( false === wp_cache_get($id, 'post_meta') )