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.6] Throws an exception if null driver is given. #22018

Merged
merged 1 commit into from
Nov 9, 2017

Conversation

crynobone
Copy link
Member

Related to #22017 PR it might be useful to actually throws an exception for null driver instead of letting PHP throws un-useful warning.

screen shot 2017-11-09 at 8 50 46 am

Signed-off-by: Mior Muhammad Zaki crynobone@gmail.com

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
@taylorotwell taylorotwell merged commit ec68820 into laravel:master Nov 9, 2017
@browner12
Copy link
Contributor

what if your service allows null drivers?

@crynobone
Copy link
Member Author

what if your service allows null drivers?

null is not the same as "null" string. It's invalid to pass null to createDriver() method.

@crynobone crynobone deleted the disallow-null-driver branch November 9, 2017 14:15
@browner12
Copy link
Contributor

gotcha, good point. How about a message like, "Unable to resolve default driver." instead since the use of the word "null" in there could lead to some confusion?

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.

3 participants