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

BadMethodCallException gets swallowed up by ViewLayerData #11481

Open
GuySartorelli opened this issue Nov 28, 2024 · 0 comments
Open

BadMethodCallException gets swallowed up by ViewLayerData #11481

GuySartorelli opened this issue Nov 28, 2024 · 0 comments

Comments

@GuySartorelli
Copy link
Member

GuySartorelli commented Nov 28, 2024

ViewLayerData intentionally catches BadMethodCallException thrown in a __call() method - but makes no attempt to validate the exception is actually thrown inside a _call() method.

So say you have $SomeMethod in a template.
That successfully goes through ModelData::__call('SomeMethod') and results in calling the SomeMethod() method - and then that method tries to call something that doesn't exist. That would result in a BadMethodCallException being thrown which should not be ignored.

PRs

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

No branches or pull requests

1 participant