From 0b412d3333d4b2aa758d32601c84cb0327f8c2a2 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 12 Sep 2015 15:38:27 +0000 Subject: [PATCH] `sanitize_post()` is polymorphic, add an `is_array()` check for `$post` before operating on it as an array. Props morganestes. Fixes #33118. Built from https://develop.svn.wordpress.org/trunk@34080 git-svn-id: http://core.svn.wordpress.org/trunk@34048 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-functions.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/post-functions.php b/wp-includes/post-functions.php index bc084c46fa..404d07cc6b 100644 --- a/wp-includes/post-functions.php +++ b/wp-includes/post-functions.php @@ -1814,7 +1814,7 @@ function sanitize_post( $post, $context = 'display' ) { foreach ( array_keys(get_object_vars($post)) as $field ) $post->$field = sanitize_post_field($field, $post->$field, $post->ID, $context); $post->filter = $context; - } else { + } elseif ( is_array( $post ) ) { // Check if post already filtered for this context. if ( isset($post['filter']) && $context == $post['filter'] ) return $post; diff --git a/wp-includes/version.php b/wp-includes/version.php index c6b102374a..58e4443177 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34079'; +$wp_version = '4.4-alpha-34080'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.