Skip to content

Commit fa468e2

Browse files
Fixed map packing with non-string keys.
1 parent 73f37ca commit fa468e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PackStream/v1/Packer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ private function packMap(array $arr): string
186186
}
187187

188188
foreach ($arr as $k => $v) {
189-
$output .= $this->p($k);
189+
$output .= $this->p((string)$k); // The key names in a map must be of type String.
190190
$output .= $this->p($v);
191191
}
192192

0 commit comments

Comments
 (0)