Make WordPress Core

Ticket #32835: 32835.patch

File 32835.patch, 600 bytes (added by luciole135, 9 years ago)
  • src/wp-includes/date.php

     
    356356                // Weeks per year.
    357357                if ( isset( $_year ) ) {
    358358                        // If we have a specific year, use it to calculate number of weeks.
    359                         $date = new DateTime();
    360                         $date->setISODate( $_year, 53 );
    361                         $week_count = $date->format( "W" ) === "53" ? 53 : 52;
     359                        $week_count = date('W',mktime(0,0,0,12,28,$date_query['year']));
    362360
    363361                } else {
    364362                        // Otherwise set the week-count to a maximum of 53.