From 00c68f0c01ee11ab62a9eb35588884b49ca3f138 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 19 Oct 2017 00:36:09 +0100 Subject: [PATCH] Bigger doughhhhhhh --- src/Drivers/SQLite.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Drivers/SQLite.php b/src/Drivers/SQLite.php index 9d48003..253a9bf 100644 --- a/src/Drivers/SQLite.php +++ b/src/Drivers/SQLite.php @@ -77,12 +77,12 @@ public function __construct($options) public function put($key, $value, $time) { - $time += time(); - if ($this->has($key)) { $this->remove($key); } + $time = $time > 0 ? $time + time() : $time; + $stmt = $this->db->prepare("INSERT INTO \"$this->table_name\" VALUES (?, ?, ?)"); $stmt->bindParam(1, $key, SQLITE3_TEXT);