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] Fix is_external_url modifier with Link fields #10027

Merged
merged 1 commit into from
May 9, 2024

Conversation

duncanmcclean
Copy link
Member

This pull request fixes an issue with the is_external_url modifier where it'd error out when passed a Link field.

The error is actually coming from inside the URL::isExternal method, with the caching changes introduced in #9646. The method is expecting a string be passed to it instead of an ArrayableLink object like is the case w/ Link fields.

This worked fine in v4 because ArrayableLink casts to a string but with the recent caching changes, it's trying to get items in an array using ArrayableLink as a key which doesn't work. I though converting the value to a string before it ends up in isExternal might be the best way to fix it.

Fixes #10026.

@jasonvarga jasonvarga merged commit c7c35e2 into 5.x May 9, 2024
32 checks passed
@jasonvarga jasonvarga deleted the fix/is-external-url-modifier-with-link-fields branch May 9, 2024 17:35
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.

is_external_url modifier broken in 5.x
2 participants