-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.1.2
-
Component/s: None
-
None
The BSON specification defines a binary subtype as one byte. Since PHP can only parse it as an integer, we should throw an exception if the argument is out of range (i.e. less than zero or greater than 255).
Currently, a larger integer will be silently truncated when assigned to an uint8_t in bson_append_binary().