Ticket #8153: localized-dates-options-general-fixup.diff
File localized-dates-options-general-fixup.diff, 721 bytes (added by , 15 years ago) |
---|
-
wp-includes/functions.php
112 112 * @param int $unixtimestamp Unix timestamp 113 113 * @return string The date, translated if locale specifies it. 114 114 */ 115 function date_i18n( $dateformatstring, $unixtimestamp , $gmt = false ) {115 function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) { 116 116 global $wp_locale; 117 117 $i = $unixtimestamp; 118 118 // Sanity check for PHP 5.1.0- 119 if ( intval($i) < 1)119 if ( false === $i || intval($i) < 0 ) 120 120 $i = time(); 121 121 122 122 if ( ( !empty( $wp_locale->month ) ) && ( !empty( $wp_locale->weekday ) ) ) {