Browse Source

Fix DatabaseCacheDriver::get SQL select

- Fix typo
- Fix wrong usage of NOW()
pull/4549/head
Hypolite Petovan 3 years ago
parent
commit
3df34d33d5
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Core/Cache/DatabaseCacheDriver.php

+ 1
- 1
src/Core/Cache/DatabaseCacheDriver.php View File

@ -16,7 +16,7 @@ class DatabaseCacheDriver implements ICacheDriver
{
public function get($key)
{
$cache = dba::selectFirst('cache', ['v'], ['`k` = ? AND `expires` >= NOW()`', $key]);
$cache = dba::selectFirst('cache', ['v'], ['`k` = ? AND `expires` >= ?', $key, DateTimeFormat::utcNow()]);
if (DBM::is_result($cache)) {
$cached = $cache['v'];


Loading…
Cancel
Save