From 0b83cc1acfedfaccdc6dbc335af86a2ec61382b0 Mon Sep 17 00:00:00 2001 From: eddiclin Date: Wed, 16 May 2018 20:40:45 +0800 Subject: [PATCH] If the expiration is null, then set it permanently when increments. (#24228) --- src/Illuminate/Cache/FileStore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Cache/FileStore.php b/src/Illuminate/Cache/FileStore.php index 4cf97da3b6b4..cead4ac85290 100755 --- a/src/Illuminate/Cache/FileStore.php +++ b/src/Illuminate/Cache/FileStore.php @@ -91,7 +91,7 @@ public function increment($key, $value = 1) $raw = $this->getPayload($key); return tap(((int) $raw['data']) + $value, function ($newValue) use ($key, $raw) { - $this->put($key, $newValue, $raw['time']); + $this->put($key, $newValue, $raw['time'] ?? 0); }); }