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

Add is_array() check on _normalizeValueCraft2 to avoid possible type errors #28

Closed
wants to merge 1 commit into from

Conversation

gsumpster
Copy link

Hi, I started rolling this plugin out on a Craft site today to replace a few existing link plugins and ran into an issue where the _normalizeValueCraft2 function would attempt to grab the type of existing content which was a string, this would cause 500 errors in both the control panel and on the site itself.

I've just added a quick is_array() check to that function and that seems to have done the trick!

@samhibberd
Copy link
Collaborator

Hmm, odd one, not sure why an existing field would be a string? Will get the array check added in the next release. Thanks.

@samhibberd samhibberd closed this May 8, 2018
@gsumpster
Copy link
Author

Sorry for the delay on responding to this. In my case, this was because I had switched from a different plugin to this one. This would also be the case if you were to switch from a plain text field to the LinkIt field, bit of an edge case.

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.

None yet

2 participants