Make WordPress Core

Ticket #54186: 54186.patch

File 54186.patch, 517 bytes (added by hilayt24, 3 years ago)

Explicitly converted the strings to the integer

  • post.php

     
    47154715        }
    47164716
    47174717        // Validate the date.
    4718         $month = substr( $post_date, 5, 2 );
    4719         $day   = substr( $post_date, 8, 2 );
    4720         $year  = substr( $post_date, 0, 4 );
     4718        $month = (int)substr( $post_date, 5, 2 );
     4719        $day   = (int)substr( $post_date, 8, 2 );
     4720        $year  = (int)substr( $post_date, 0, 4 );
    47214721
    47224722        $valid_date = wp_checkdate( $month, $day, $year, $post_date );
    47234723