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 Don't swallow relevant BadMethodCallExceptions from ViewLayerData #11482

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

GuySartorelli
Copy link
Member

@GuySartorelli GuySartorelli commented Nov 28, 2024

Without this PR, scenarios "exception thrown outside __call()" and "exception thrown in __call() in a different class hierarchy" would fail.

Issue

@GuySartorelli
Copy link
Member Author

GuySartorelli commented Nov 28, 2024

I'm fairly sure the inmemorycache CI run failure is unrelated - I've spun up a CI run on the 6 branch to confirm.

Update: All CI failures match what's on the 6 branch.

Comment on lines -27 to +30
return call_user_func_array([$this->customised, $method], $arguments ?? []);
return $this->customised->$method(...$arguments);
}

return call_user_func_array([$this->original, $method], $arguments ?? []);
return $this->original->$method(...$arguments);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed because call_user_func_array shows up in the stack trace and would result in throwing the exception instead of ignoring it. See https://github.com/silverstripe/silverstripe-framework/actions/runs/12062241360/job/33635620688?pr=11482

@emteknetnz emteknetnz merged commit 89e8b36 into silverstripe:6 Nov 28, 2024
10 of 12 checks passed
@emteknetnz emteknetnz deleted the pulls/6/badmethodcall branch November 28, 2024 22:52
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