Make WordPress Core

Ticket #37738: 37738.php.patch

File 37738.php.patch, 416 bytes (added by deeptiboddapati, 8 years ago)

changed so it accepts numeric strings like '1' or '1.3231'

  • class-wp-post.php

     
    209209         */
    210210        public static function get_instance( $post_id ) {
    211211                global $wpdb;
    212 
     212                if(!(is_numeric($post_id) or is_bool($post_id))){
     213                        return false;
     214                }
    213215                $post_id = (int) $post_id;
    214216                if ( ! $post_id )
    215217                        return false;