From aa6d3c91f55a25c19b0f745852509aaf1671d573 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 11 Nov 2008 20:40:36 +0000 Subject: [PATCH] Fix warnings. Props nbachiyski. fixes #8153 git-svn-id: https://develop.svn.wordpress.org/trunk@9618 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index d410641969..8b072faa5a 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -112,11 +112,11 @@ function current_time( $type, $gmt = 0 ) { * @param int $unixtimestamp Unix timestamp * @return string The date, translated if locale specifies it. */ -function date_i18n( $dateformatstring, $unixtimestamp, $gmt = false ) { +function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) { global $wp_locale; $i = $unixtimestamp; // Sanity check for PHP 5.1.0- - if ( intval($i) < 1 ) + if ( false === $i || intval($i) < 0 ) $i = time(); if ( ( !empty( $wp_locale->month ) ) && ( !empty( $wp_locale->weekday ) ) ) {