]> git.mxchange.org Git - friendica.git/commitdiff
Fix DatabaseCacheDriver::get SQL select
authorHypolite Petovan <mrpetovan@gmail.com>
Thu, 1 Mar 2018 05:33:44 +0000 (00:33 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Mon, 5 Mar 2018 04:13:19 +0000 (23:13 -0500)
- Fix typo
- Fix wrong usage of NOW()

src/Core/Cache/DatabaseCacheDriver.php

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