Make sure we have a valid timestamp. fixes #2148
git-svn-id: https://develop.svn.wordpress.org/trunk@3359 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
01d852fe7f
commit
76c78b624d
|
@ -22,6 +22,10 @@ function mysql2date($dateformatstring, $mysqlstring, $translate = true) {
|
||||||
return false;
|
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));
|
$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 ) {
|
if ( !empty($month) && !empty($weekday) && $translate ) {
|
||||||
$datemonth = $month[date('m', $i)];
|
$datemonth = $month[date('m', $i)];
|
||||||
$datemonth_abbrev = $month_abbrev[$datemonth];
|
$datemonth_abbrev = $month_abbrev[$datemonth];
|
||||||
|
|
Loading…
Reference in New Issue