Skip to content
Snippets Groups Projects
Commit 1511c471 authored by Thijs Kinkhorst's avatar Thijs Kinkhorst
Browse files

SQLPermanent storage: expire: syntax fix IS (NOT) NULL

parent 9b0f3943
Branches
Tags
No related merge requests found
...@@ -186,7 +186,7 @@ class sspmod_core_Storage_SQLPermanentStorage ...@@ -186,7 +186,7 @@ class sspmod_core_Storage_SQLPermanentStorage
public function removeExpired() public function removeExpired()
{ {
$query = "DELETE FROM data WHERE expire NOT NULL AND expire < :expire"; $query = "DELETE FROM data WHERE expire IS NOT NULL AND expire < :expire";
$prepared = $this->db->prepare($query); $prepared = $this->db->prepare($query);
$data = array(':expire' => time()); $data = array(':expire' => time());
$prepared->execute($data); $prepared->execute($data);
...@@ -209,7 +209,7 @@ class sspmod_core_Storage_SQLPermanentStorage ...@@ -209,7 +209,7 @@ class sspmod_core_Storage_SQLPermanentStorage
$conditions[] = "key2 = ".$this->db->quote($key2); $conditions[] = "key2 = ".$this->db->quote($key2);
} }
$conditions[] = "(expire = NULL OR expire >= ".time().")"; $conditions[] = "(expire IS NULL OR expire >= ".time().")";
return join(' AND ', $conditions); return join(' AND ', $conditions);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment