]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Cache/Type/DatabaseCache.php
Merge branch 'friendica:develop' into 6606-k-alin-mysql-unix-socket
[friendica.git] / src / Core / Cache / Type / DatabaseCache.php
index ef6a30afeb80725eae13ad3acef2c4a7577dd0a3..a49299b2fd665447457dfd2bcd5805319bda4a81 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -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 ']);
                        }