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

Prevent MissingAttributeException for guard_name #2216

Merged
merged 1 commit into from
Oct 19, 2022
Merged

Conversation

ejunker
Copy link
Contributor

@ejunker ejunker commented Oct 17, 2022

When new Laravel feature Model::preventAccessingMissingAttributes() is enabled you may get a MissingAttributeException for guard_name. This change uses getAttributeValue() to prevent the exception. Fixes #2215

When new Laravel feature `Model::preventAccessingMissingAttributes()` is enabled you may get a `MissingAttributeException` for `guard_name`. This change uses `getAttributeValue()` to prevent the exception. Fixes spatie#2215
@drbyte drbyte changed the title Prevent MissingAttributeException for guard_name Prevent MissingAttributeException for guard_name Oct 19, 2022
@drbyte drbyte merged commit 1ed2b83 into spatie:main Oct 19, 2022
@drbyte
Copy link
Collaborator

drbyte commented Oct 19, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting Model::shouldBeStrict() on Laravel 9.35 breaks app
2 participants