Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache()->many() with empty array gives unexpected result. #47298

Closed
fuale opened this issue May 31, 2023 · 1 comment
Closed

cache()->many() with empty array gives unexpected result. #47298

fuale opened this issue May 31, 2023 · 1 comment
Assignees
Labels

Comments

@fuale
Copy link

fuale commented May 31, 2023

Laravel Version

9.52.7

PHP Version

8.2.4

Database Driver & Version

No response

Description

It's not fully a bug, but half question. Why Illuminate\Redis\Connections\PhpRedisConnection::mget method returns array_map(): Argument #2 ($array) must be of type array, bool given. when empty array provided? Error is not obvious.

Maybe it should be (call result) empty array, false, null or exception? I think we need to check if empty array was passed.

Steps To Reproduce

  1. configure redis cache on empty project using redis php extension
  2. call cache()->many([]); in tinker
@nunomaduro
Copy link
Member

Fixed here: #47307.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants