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 the stupidest type check ever. #59

Merged
merged 2 commits into from
Feb 13, 2024

Conversation

DanielCoulbourne
Copy link
Contributor

@DanielCoulbourne DanielCoulbourne commented Feb 13, 2024

hilariously $result instanceof bool is not identical to is_bool($result) because of too many boolean types in this very good language.

@@ -67,8 +67,8 @@ protected function passesAuthorization(): bool
if ($result instanceof Response) {
return $result->authorize();
}

if ($result instanceof bool) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

@DanielCoulbourne DanielCoulbourne merged commit eb8edca into main Feb 13, 2024
@DanielCoulbourne DanielCoulbourne deleted the daniel/fix-stupid-boolean-check branch February 13, 2024 03:27
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.

1 participant