Skip to content

Commit 5d5d946

Browse files
authored
Use config instead of settings
1 parent ea225a1 commit 5d5d946

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

system/Session/Handlers/DatabaseHandler.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -312,17 +312,17 @@ protected function releaseLock(): bool
312312
*/
313313
private function now($interval = null): string
314314
{
315-
$DBDriver = service('settings')->get("Database.{$this->DBGroup}")['DBDriver'];
316-
return !is_null($interval)
315+
$DBDriver = config(Database::class)->{$this->DBGroup}['DBDriver'];
316+
return null === $interval
317317
? match($DBDriver)
318318
{
319-
'SQLite3' => "datetime('now', '-{$interval}')",
320-
default => "now() - INTERVAL {$interval}",
319+
'SQLite3' => "datetime('now')",
320+
default => "now()",
321321
}
322322
: match($DBDriver)
323323
{
324-
'SQLite3' => "datetime('now')",
325-
default => "now()",
324+
'SQLite3' => "datetime('now', '-{$interval}')",
325+
default => "now() - INTERVAL {$interval}",
326326
};
327327
}
328328
}

0 commit comments

Comments
 (0)