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

[5.x] Prevent error when redirecting to first asset container #10521

Merged

Conversation

duncanmcclean
Copy link
Member

@duncanmcclean duncanmcclean commented Jul 29, 2024

This pull request prevents a Call to undefined method Closure::first() error from happening when redirecting to the first asset container.

Sometimes, due to how the CP Nav gets cached, a nav item's children property may be a closure. In our case, we can simply call ->resolveChildren() to ensure a nav item's children are "resolved" before we get them.

Fixes #10520.

@jasonvarga jasonvarga merged commit c7e132a into 5.x Jul 29, 2024
19 checks passed
@jasonvarga jasonvarga deleted the prevent-error-when-redirecting-to-first-asset-container branch July 29, 2024 16:00
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.

Error accessing assets in CP after 5.14.0
2 participants