1
0
Fork 0

Replace references to NOW() in SQL queries with a DateTimeFormat generated parameter

This commit is contained in:
Hypolite Petovan 2021-12-02 09:20:50 -05:00
commit 423892b814
2 changed files with 4 additions and 5 deletions

View file

@ -146,7 +146,7 @@ class DatabaseCache extends AbstractCache implements ICanCache
{
try {
if ($outdated) {
return $this->dba->delete('cache', ['`expires` < NOW()']);
return $this->dba->delete('cache', ['`expires` < ?', DateTimeFormat::utcNow()]);
} else {
return $this->dba->delete('cache', ['`k` IS NOT NULL ']);
}