Thanks to visit codestin.com
Credit goes to github.com

Skip to content

XmlEncoder Bug for big integer attribute value #22329

Closed
@smile1980

Description

@smile1980
Q A
Bug report? yes
Symfony version 3.2.7

File: symfony\symfony\src\Symfony\Component\Serializer\Encoder\XmlEncoder.php
Method: parseXmlAttributes
Code:

        foreach ($node->attributes as $attr) {
            if (ctype_digit($attr->nodeValue)) {
                $data['@'.$attr->nodeName] = (int) $attr->nodeValue;
            } else {
                $data['@'.$attr->nodeName] = $attr->nodeValue;
            }
        }

If attribute value > "2147483647" then result value exact 2147483647

For example, if the value of the attribute is "8834232342323423423", then the value will be 2147483647.

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