Skip to content

Cast attribute value to string? #125

Open
@jbrooksuk

Description

@jbrooksuk

When passing an attribute that is a non-string value, writeAttribute throws an exception:

TypeError: XMLWriter::writeAttribute() expects parameter 2 to be string, integer given

Would it not be ideal to simply cast the value as a string and avoid the exception? This makes the API way more developer friendly IMHO.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions