Skip to content

Commit 4c6c24f

Browse files
authored
Merge pull request #29610 from laravel/5.5-psr-16
[5.5] Fixed incorrect implementation of PSR-16
2 parents 0f53880 + 1663d74 commit 4c6c24f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Cache/Repository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public function put($key, $value, $minutes = null)
199199
*/
200200
public function set($key, $value, $ttl = null)
201201
{
202-
$this->put($key, $value, $ttl);
202+
$this->put($key, $value, is_int($ttl) ? $ttl / 60 : null);
203203
}
204204

205205
/**
@@ -225,7 +225,7 @@ public function putMany(array $values, $minutes)
225225
*/
226226
public function setMultiple($values, $ttl = null)
227227
{
228-
$this->putMany(is_array($values) ? $values : iterator_to_array($values), $ttl);
228+
$this->putMany(is_array($values) ? $values : iterator_to_array($values), is_int($ttl) ? $ttl / 60 : null);
229229
}
230230

231231
/**

0 commit comments

Comments
 (0)