Skip to content

Commit 63a956a

Browse files
authored
Fix case-insensitive boolean deserialization
The visitBoolean() method only accepts lowercase "true"/"false" but XML APIs (notably .NET-based services) commonly return "True"/"False".
1 parent b02a6c0 commit 63a956a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/XmlDeserializationVisitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function visitBoolean($data, array $type): bool
142142
{
143143
$this->assertValueCanBeCastToString($data);
144144

145-
$data = (string) $data;
145+
$data = strtolower((string) $data);
146146

147147
if ('true' === $data || '1' === $data) {
148148
return true;

0 commit comments

Comments
 (0)