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

[5.7] Added default array value for redis config #25443

Merged
merged 1 commit into from
Sep 4, 2018
Merged

[5.7] Added default array value for redis config #25443

merged 1 commit into from
Sep 4, 2018

Conversation

robbytaylor
Copy link
Contributor

If the redis config is missing from the database configuration then there's an error due to the first argument to Arr::pull() being null and not an array:

array_key_exists() expects parameter 2 to be array, null given

Line 27 already defines a default value for the client part of the configuration so it's not actually required to have any configuration to create the instance of RedisManager.

After this change having no Redis configuation at all will still result in an InvalidArgumentException if the Redis connection is used:

Redis connection [default] not configured.

But this is more descriptive and easier to debug than the array_key_exists error.

@taylorotwell taylorotwell merged commit 68b84b7 into laravel:5.7 Sep 4, 2018
@GrahamCampbell GrahamCampbell changed the title Added default array value for redis config [5.7] Added default array value for redis config Sep 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants