WordPress.org

Make WordPress Core

Ticket #30845: 30845.2.patch

File 30845.2.patch, 552 bytes (added by luciole135, 4 years ago)

patch for WordPress 4.3

  • 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.