Skip to content

Commit

Permalink
[10.x] Add keys length check to prevent mget error (laravel#46998)
Browse files Browse the repository at this point in the history
* [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 <t.terhaar@tflabs.nl>
  • Loading branch information
2 people authored and milwad-dev committed May 12, 2023
1 parent 8ca9cf3 commit 3a45915
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Cache/RedisStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ public function get($key)
*/
public function many(array $keys)
{
if (count($keys) === 0) {
return [];
}

$results = [];

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

0 comments on commit 3a45915

Please sign in to comment.