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 method_exists when model is not string or object (PHP8) #671

Merged
merged 1 commit into from
Dec 15, 2020

Conversation

repat
Copy link
Contributor

@repat repat commented Nov 19, 2020

image

method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given

PHP: 8.0.0-dev (RC4)

Happens when I used Form::checkbox() without calling Form::model() first. But you might not always need Form::model(). I added is_string($this->model) || is_object($this->model) in that if statement, so it doesn't crash.

@repat
Copy link
Contributor Author

repat commented Nov 29, 2020

@mlantz ping:)

@alsma
Copy link

alsma commented Nov 30, 2020

I'm also interested in this fix, please give some updates on this

@mickedplay
Copy link

+1

1 similar comment
@st3f
Copy link

st3f commented Dec 4, 2020

+1

fulopattila122 added a commit to artkonekt/appshell that referenced this pull request Dec 8, 2020
@repat repat changed the title Fix method_exists when model is not string or object Fix method_exists when model is not string or object (PHP8) Dec 9, 2020
@mlantz mlantz merged commit af6e88d into LaravelCollective:6.x Dec 15, 2020
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.

6 participants