Skip to content

Bug pars xml #3588

Closed
Closed
@demortx

Description

@demortx

if (! is_numeric($key))

  1. arrayToXML(['BBB096630BD' => 'data...'], ...) - Its ok
  2. arrayToXML(['096630FR' => 'data...'], ...) - No ok

The problem with the second example is that it starts with a digit, and passes the check for! is_numeric, and when parsing back into an object, this xml gives an error.

The solution I think is to add a check for the first character not a digit and if a digit then add 'item'

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions