From dd23b72d1ccbb2e2527cb2dabb822c30a54b5326 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 26 Jun 2008 18:34:28 +0000 Subject: [PATCH] Fix date() warning on Windows. Props ozh. fixes #7186 git-svn-id: https://develop.svn.wordpress.org/trunk@8199 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index d2132839ba..6f66adeb68 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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 );