Skip to content

IBX-10734: simplexml_load_string() throws an exception on ezselection fields when using libxml2 2.13.8 and higher#706

Open
Sztig wants to merge 2 commits into4.6from
IBX-10734-simplexml_load_string-fix
Open

IBX-10734: simplexml_load_string() throws an exception on ezselection fields when using libxml2 2.13.8 and higher#706
Sztig wants to merge 2 commits into4.6from
IBX-10734-simplexml_load_string-fix

Conversation

@Sztig
Copy link
Contributor

@Sztig Sztig commented Jan 26, 2026

🎫 Issue IBX-10734

Description:

When creating new content type and adding selection field, it immediately tries to parse this field through converter, obviously on initial setup this field will be empty.
On certain versions of libxml2 like 2.13.8, function simplexml_load_string will throw an exception when the parameter is null.
I've added a check on $mlData->dataText to avoid this exception.

@Sztig Sztig requested a review from a team January 26, 2026 15:09
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 26, 2026

Quality Gate Passed Quality Gate passed

Issues
0 New issues
1 Accepted issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

Copy link
Contributor

@Steveb-p Steveb-p left a comment

Choose a reason for hiding this comment

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

Bonus points if you provide a unit test.

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.

Unit test should be provided, it should be fairly easy to AI-generate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants