-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
XML formater xmltoarray indexed array incorrect #577
Comments
This looks good, but can you provide some sample code that was generating the problem you saw so that I can double-check and verify. |
Return data: ==================== XML Parsing Error: not well-formed |
this should already fixed and can be closed. |
@samsonasik can you link to the specific code that fixed it? I'll need to ensure we have a test in the system to ensure this works, so want to make sure I get the test right :) |
Here it is: |
@samsonasik Perfect. Thanks! Will close. |
Don't check numeric key
https://github.com/bcit-ci/CodeIgniter4/blob/develop/system/Format/XMLFormatter.php#L95
Solution
if (! is_numeric($key))
{
$output->addChild("$key", htmlspecialchars("$value"));
} else
{
$output->addChild("item{$key}", htmlspecialchars("$value"));
}
The text was updated successfully, but these errors were encountered: