From 3df34d33d5fbc4b7599cb1df09c0af4648f4f7c7 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 1 Mar 2018 00:33:44 -0500 Subject: [PATCH] Fix DatabaseCacheDriver::get SQL select - Fix typo - Fix wrong usage of NOW() --- src/Core/Cache/DatabaseCacheDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Cache/DatabaseCacheDriver.php b/src/Core/Cache/DatabaseCacheDriver.php index 0aefc812b9..9703208d7b 100644 --- a/src/Core/Cache/DatabaseCacheDriver.php +++ b/src/Core/Cache/DatabaseCacheDriver.php @@ -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']; -- 2.39.5