WordPress.org

Make WordPress Core

Ticket #47177: 47177.patch

File 47177.patch, 1.2 KB (added by dkarfa, 7 months ago)
  • src/wp-includes/general-template.php

     
    217217         * in 5.2.0. Then we deal with the $args array and cast its defaults.
    218218         */
    219219        $echo = true;
    220         if ( false === $args ) {
     220        if ( false === boolval( $args ) ) {
    221221                $echo = false;
    222222        }
    223223
     
    774774                        $output = $wp_version;
    775775                        break;
    776776                case 'language':
    777                         /* translators: Translate this to the correct language tag for your locale,
     777                        /*
     778                         translators: Translate this to the correct language tag for your locale,
    778779                         * see https://www.w3.org/International/articles/language-tags/ for reference.
    779780                         * Do not translate into your own language.
    780781                         */
     
    20922093        } elseif ( ! empty( $w ) ) {
    20932094                // We need to get the month from MySQL
    20942095                $thisyear = (int) substr( $m, 0, 4 );
    2095                 //it seems MySQL's weeks disagree with PHP's
     2096                // it seems MySQL's weeks disagree with PHP's
    20962097                $d         = ( ( $w - 1 ) * 7 ) + 6;
    20972098                $thismonth = $wpdb->get_var( "SELECT DATE_FORMAT((DATE_ADD('{$thisyear}0101', INTERVAL $d DAY) ), '%m')" );
    20982099        } elseif ( ! empty( $m ) ) {