Skip to content

Commit 49e0957

Browse files
committed
Valid read preference tag sets should always be documents
This function was originally implemented in PHPC-424, before we started preparing tag sets in PHPC-359 to ensure that they serialized as BSON documents. There is no longer any reason to allow array types here.
1 parent 6b41ed0 commit 49e0957

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php_phongo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ bool php_phongo_read_preference_tags_are_valid(const bson_t *tags) /* {{{ */
878878
}
879879

880880
while (bson_iter_next(&iter)) {
881-
if (!BSON_ITER_HOLDS_DOCUMENT(&iter) && !BSON_ITER_HOLDS_ARRAY(&iter)) {
881+
if (!BSON_ITER_HOLDS_DOCUMENT(&iter)) {
882882
return false;
883883
}
884884
}

0 commit comments

Comments
 (0)