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

fix bug for always throwing exception when we pass a callable to throwUnlessStatus method [test included] #48844

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

mhfereydouni
Copy link
Contributor

In the current code if the $statusCode is callable and it returns true we correctly do not throw an exception in the if statement but in the ternary condition since $statusCode is callable and $this->status() returns an integer we throw an exception anyway.
This pull request tries to address this problem.

@taylorotwell taylorotwell merged commit c55667a into laravel:10.x Oct 30, 2023
20 checks passed
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