From 76c78b624dd804c1fe0d3713e2ac08d255bd8e7c Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sun, 25 Dec 2005 21:42:07 +0000 Subject: [PATCH] Make sure we have a valid timestamp. fixes #2148 git-svn-id: https://develop.svn.wordpress.org/trunk@3359 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 ad79494443..66d147261b 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -22,6 +22,10 @@ function mysql2date($dateformatstring, $mysqlstring, $translate = true) { return false; } $i = mktime(substr($m,11,2),substr($m,14,2),substr($m,17,2),substr($m,5,2),substr($m,8,2),substr($m,0,4)); + + if ( -1 == $i || false == $i ) + $i = 0; + if ( !empty($month) && !empty($weekday) && $translate ) { $datemonth = $month[date('m', $i)]; $datemonth_abbrev = $month_abbrev[$datemonth];