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

[BUGFIX] Avoid unsafe array access to colPos #150

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smichaelsen
Copy link

When content elements are created as inline records (for example in news) they usually don't come with a colPos. This results in a fatal error with PHP 8.

When content elements are created as inline records (for example in news) they usually don't come with a colPos. This results in a fatal error with PHP 8.
@IchHabRecht
Copy link
Owner

Hi @smichaelsen,

Please see my comment on #143. I still think it's wrong to fall back to colpos 0 as there might be some configuration which gets applied here. There needs to be a check for some whitelist items according to some value from the request and return early without any content_defender interaction.

@smichaelsen
Copy link
Author

You mean an early return in the content_defender hook class if some crucial fields are not provided? I can change my PR in that direction, if you want.

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

Successfully merging this pull request may close these issues.

2 participants