fix: preserve zero values in XML export#10367
Open
gr8man wants to merge 1 commit into
Open
Conversation
michalsn
reviewed
Jul 2, 2026
michalsn
left a comment
Member
There was a problem hiding this comment.
Looks good.
Please rebase:
git rebase upstream/develop
Update PHPStan baseline:
composer phpstan:baseline
And later, push changes:
git push --force-with-lease origin fix/xml-export-zero-value
71e92f6 to
0f26db4
Compare
0f26db4 to
abeb4c7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In
BaseUtils::getXMLFromResult(), database values of0or'0'were incorrectly treated as empty and replaced with empty strings ('') in the generated XML export due to the use of theempty()check.This PR replaces
empty($val)with a strict comparison($val === null || $val === '')to ensure that zero values are preserved in the exported XML, while still correctly replacing actualnulland empty string values with an empty element value.Checklist: