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: Allow Core to be null #7

Merged
merged 1 commit into from
Mar 5, 2024
Merged

fix: Allow Core to be null #7

merged 1 commit into from
Mar 5, 2024

Conversation

MiniCodeMonkey
Copy link
Collaborator

@MiniCodeMonkey MiniCodeMonkey commented Mar 1, 2024

When Wafris is disabled, the Core class is resolved to null: https://github.com/Wafris/laravel-wafris/blob/main/src/WafrisServiceProvider.php#L17

This causes the AllowRequestMiddleware class constructor to fail, because it expects the Core type to be resolved. By adding questions mark, we allow Core to be nullable.

Screenshot 2024-03-01 at 10 38 39

This is the case when Wafris is configured to be disabled
@rmcastil rmcastil merged commit f9b0a61 into main Mar 5, 2024
6 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