Skip to content

Commit

Permalink
If the expiration is null, then set it permanently when increments. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiclin authored and taylorotwell committed May 16, 2018
1 parent ca75ec8 commit 0b83cc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Cache/FileStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}

Expand Down

0 comments on commit 0b83cc1

Please sign in to comment.