Fix DatabaseCacheDriver::get SQL select

- Fix typo
- Fix wrong usage of NOW()
This commit is contained in:
Hypolite Petovan 2018-03-01 00:33:44 -05:00
parent 41d5c7d4c7
commit 3df34d33d5
1 changed files with 1 additions and 1 deletions

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'];