bugfix: datetime::diff wont't work in PHP < 5.3, added version_compare
Dieser Commit ist enthalten in:
Ursprung
88067d2286
Commit
10d8daee24
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
|
@ -14,8 +14,8 @@
|
|||
*/
|
||||
|
||||
$cfgMod = array(
|
||||
'debug' => true,
|
||||
'eak_imgset' => 'Extra/',
|
||||
'debug' => false,
|
||||
'eak_imgset' => 'default/',
|
||||
'show_countdown' => true
|
||||
);
|
||||
|
||||
|
@ -133,7 +133,7 @@ function daysdiff($dt1, $dt2, $timeZone = 'UTC') {
|
|||
// use the DateTime datediff function IF we have a non-buggy version
|
||||
// there is a bug in many Windows implementations that diff() always returns
|
||||
// 6015
|
||||
if( $dt1->diff($dt1)->format("%a") != 6015 ) {
|
||||
if(version_compare(phpversion(), "5.3", ">=") && $dt1->diff($dt1)->format("%a") != 6015 ) {
|
||||
return $dt1->diff($dt2)->format("%a");
|
||||
}
|
||||
|
||||
|
|
Laden …
In neuem Issue referenzieren