Make WordPress Core

Changeset 34080


Ignore:
Timestamp:
09/12/2015 03:37:50 PM (10 years ago)
Author:
wonderboymusic
Message:

sanitize_post() is polymorphic, add an is_array() check for $post before operating on it as an array.

Props morganestes.
Fixes #33118.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-functions.php

    r34001 r34080  
    18151815            $post->$field = sanitize_post_field($field, $post->$field, $post->ID, $context);
    18161816        $post->filter = $context;
    1817     } else {
     1817    } elseif ( is_array( $post ) ) {
    18181818        // Check if post already filtered for this context.
    18191819        if ( isset($post['filter']) && $context == $post['filter'] )
Note: See TracChangeset for help on using the changeset viewer.