PHP Version: 8.0
Laravel Framework 8.76.1
laravelcollective/html: v6.2.1
Issue location: \Collective\Html\Eloquent\FormAccessible:52
When Form class encounters a value from a missing relation, it correctly returns false for isNestedModel .
However, Laravel places the name of [missing] relation into subject's relations array with null value.
When the second value from the missing nested model is looked up isNestedModel now returns true (correctly) and as a result, null fetched with getRelation() is passed to method_exists on line 52 forcing PHP 8.0 to throw
TypeError
method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given`
PHP Version: 8.0
Laravel Framework 8.76.1
laravelcollective/html: v6.2.1
Issue location: \Collective\Html\Eloquent\FormAccessible:52
When Form class encounters a value from a missing relation, it correctly returns
falseforisNestedModel.However, Laravel places the name of [missing] relation into subject's
relationsarray withnullvalue.When the second value from the missing nested model is looked up
isNestedModelnow returnstrue(correctly) and as a result,nullfetched withgetRelation()is passed tomethod_existson line 52 forcing PHP 8.0 to throwTypeError method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given`