mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR: don't trigger notice but Debug::show it
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113936 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
1fb51c6c5d
commit
fdebd72e97
@ -7,7 +7,6 @@ class DbDatetimeTest extends FunctionalTest {
|
||||
private static $offset = 0; // number of seconds of php and db time are out of sync
|
||||
private static $offset_thresholds = array( // throw an error if the offset exceeds 30 minutes
|
||||
E_USER_ERROR => 1800,
|
||||
E_USER_WARNING => 60,
|
||||
E_USER_NOTICE => 5,
|
||||
);
|
||||
|
||||
@ -35,7 +34,11 @@ class DbDatetimeTest extends FunctionalTest {
|
||||
self::$offset = time() - strtotime(DB::query('SELECT ' . DB::getConn()->now())->value());
|
||||
foreach(self::$offset_thresholds as $code => $offset) {
|
||||
if(abs(self::$offset) > $offset) {
|
||||
trigger_error('The time of the databse is out of sync with the webserver by ' . abs(self::$offset) . ' seconds.', $code);
|
||||
if($code == E_USER_ERROR) {
|
||||
Debug::show('The time of the database is out of sync with the webserver by ' . abs(self::$offset) . ' seconds.');
|
||||
} else {
|
||||
trigger_error('The time of the database is out of sync with the webserver by ' . abs(self::$offset) . ' seconds.', $code);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user