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

[9.x] Check if isPrecognitive() method exists before calling it #44565

Closed
wants to merge 1 commit into from

Conversation

ejunker
Copy link
Contributor

@ejunker ejunker commented Oct 12, 2022

The ValidatesWhenResolvedTrait calls isPrecognitive() which is only present in the CanBePrecognitive trait. The CanBePrecognitive trait is used in Request. This works fine with FormRequest because it extends Request but if you want to use the ValidatesWhenResolvedTrait to create your own validating objects it has an error. This change will check if the isPrecognitive() method exists before calling it.

I am using the ValidatesWhenResolvedTrait in my DTOs so that when it is resolved it can also validate the data.

The ValidatesWhenResolvedTrait calls a method that is only present in the CanBePrecognitive trait. Check that the isPrecognitive() method exists before calling it.
@ejunker ejunker closed this Oct 13, 2022
@ejunker ejunker deleted the patch-1 branch October 13, 2022 00:06
@chrillep
Copy link

chrillep commented Oct 23, 2022

@ejunker Not sure why you closed this. It is still happening ?
ref:

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