Skip to content

Commit a9bd3bd

Browse files
tloader11tflabs-nl
andauthored
[10.x] Add keys length check to prevent mget error (#46998)
* [10.x] Add keys length check to prevent mget error * [10.x] changed formatting to comply with PR standard --------- Co-authored-by: Tristan ter Haar <[email protected]>
1 parent 0da22a8 commit a9bd3bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Illuminate/Cache/RedisStore.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ public function get($key)
7777
*/
7878
public function many(array $keys)
7979
{
80+
if (count($keys) === 0) {
81+
return [];
82+
}
83+
8084
$results = [];
8185

8286
$values = $this->connection()->mget(array_map(function ($key) {

0 commit comments

Comments
 (0)