Make WordPress Core

Ticket #49478: 49748.diff

File 49748.diff, 582 bytes (added by sebastienserre, 5 years ago)

Change type of check to be sure params is a string

  • wp-includes/post.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    12371237function get_post_type_object( $post_type ) {
    12381238        global $wp_post_types;
    12391239
    1240         if ( ! is_scalar( $post_type ) || empty( $wp_post_types[ $post_type ] ) ) {
     1240        if ( ! is_string( $post_type ) || empty( $wp_post_types[ $post_type ] ) ) {
    12411241                return null;
    12421242        }
    12431243