Skip to content

Commit 351ca71

Browse files
committed
Casting any scalar to a string when writing text.
1 parent 7547c31 commit 351ca71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Serializer/functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function standardSerializer(Writer $writer, $value) {
160160
if (is_scalar($value)) {
161161

162162
// String, integer, float, boolean
163-
$writer->text($value);
163+
$writer->text((string)$value);
164164

165165
} elseif ($value instanceof XmlSerializable) {
166166

0 commit comments

Comments
 (0)