Skip to content

Conversation

@vidarl
Copy link
Contributor

@vidarl vidarl commented Dec 17, 2025

🎫 Issue IBX-10732

Description:

A regression was made in b9575cf, b9575cf#diff-bbe0728a3f61fb1fc42bc831831ee9e83329a64d9c0fea169871ecd1ad4cf6b1R77 ( Unfortunately, the page doesn't scroll down to line 77 in ContentCreateContentTypeChoiceLoader.php automatically )

$contentType->id will be an int ( ie 2 ), while $this->restrictedContentTypesIds comming from the permission resolver will be an array of strings ( ie `["1", "2"] )

For QA:

See ticket description on how to reproduce

Documentation:

@sonarqubecloud
Copy link

@vidarl vidarl requested a review from a team January 13, 2026 08:42
Copy link
Contributor

@konradoboza konradoboza left a comment

Choose a reason for hiding this comment

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

I don't think we should remove strict type checking. What I suggest instead is casting content type ids to integers and then perform in_array with true flag as before.

@vidarl vidarl force-pushed the IBX-10732_Fixed_strict_checking_of_ContentType_IDs_in_ContentCreateContentTypeChoiceLoader branch from bf9ac00 to dfa5a8b Compare January 27, 2026 10:46
@sonarqubecloud
Copy link

@vidarl
Copy link
Contributor Author

vidarl commented Jan 27, 2026

@konradoboza

I don't think we should remove strict type checking. What I suggest instead is casting content type ids to integers and then perform in_array with true flag as before.

Fixed in dfa5a8b

@vidarl vidarl requested a review from konradoboza January 27, 2026 10:47
@konradoboza konradoboza added Bug Something isn't working Ready for QA labels Jan 27, 2026
@barbaragr barbaragr self-assigned this Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Ready for QA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants