WordPress.org

Make WordPress Core

Ticket #19751: 19751.diff

File 19751.diff, 497 bytes (added by markjaquith, 2 years ago)

Check the array before using its member.

  • wp-includes/locale.php

    class WP_Locale { 
    263263         * @return string Translated full month name 
    264264         */ 
    265265        function get_month($month_number) { 
    266                 return $this->month[zeroise($month_number, 2)]; 
     266                $zeroised = zeroise($month_number, 2); 
     267                if ( isset( $this->month[$zeroised] ) ) 
     268                        return $this->month[$zeroised]; 
    267269        } 
    268270 
    269271        /**