Fix date() warning on Windows. Props ozh. fixes #7186

git-svn-id: https://develop.svn.wordpress.org/trunk@8199 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-06-26 18:34:28 +00:00
parent d29815a314
commit dd23b72d1c
1 changed files with 4 additions and 0 deletions

View File

@ -103,6 +103,10 @@ function current_time( $type, $gmt = 0 ) {
function date_i18n( $dateformatstring, $unixtimestamp ) {
global $wp_locale;
$i = $unixtimestamp;
// Sanity check for PHP 5.1.0-
if ( -1 == $i )
$i = false;
if ( ( !empty( $wp_locale->month ) ) && ( !empty( $wp_locale->weekday ) ) ) {
$datemonth = $wp_locale->get_month( date( 'm', $i ) );
$datemonth_abbrev = $wp_locale->get_month_abbrev( $datemonth );