Skip to content

Commit 71098c5

Browse files
committed
Note that mongoc_uri_option_is_int32 includes int64 options
1 parent d190398 commit 71098c5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/phongo_client.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ static bool php_phongo_apply_options_to_uri(mongoc_uri_t* uri, bson_t* options)
156156
continue;
157157
}
158158

159+
/* Note: mongoc_uri_option_is_int32 also accepts int64 options, but
160+
* BSON_ITER_HOLDS_INT32 would reject a 64-bit value. This is not a
161+
* problem as MONGOC_URI_WTIMEOUTMS is the only 64-bit option and it is
162+
* handled explicitly in php_phongo_apply_wc_options_to_uri. */
159163
if (mongoc_uri_option_is_int32(key)) {
160164
if (!BSON_ITER_HOLDS_INT32(&iter)) {
161165
PHONGO_URI_INVALID_TYPE(iter, "32-bit integer");

0 commit comments

Comments
 (0)