Skip to content

Commit ed64c0a

Browse files
Michael FeroMichael Penick
authored andcommitted
Remove limitation on setting the maximum protocol version; must be >= 1
1 parent 090f533 commit ed64c0a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ext/src/Cassandra/Cluster/Builder.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -659,11 +659,10 @@ PHP_METHOD(ClusterBuilder, withProtocolVersion)
659659
builder = PHP_CASSANDRA_GET_CLUSTER_BUILDER(getThis());
660660

661661
if (Z_TYPE_P(version) == IS_LONG &&
662-
Z_LVAL_P(version) < 5 &&
663-
Z_LVAL_P(version) > 0) {
662+
Z_LVAL_P(version) >= 1) {
664663
builder->protocol_version = Z_LVAL_P(version);
665664
} else {
666-
INVALID_ARGUMENT(version, "either 1, 2, 3, or 4");
665+
INVALID_ARGUMENT(version, "must be >= 1");
667666
}
668667

669668
RETURN_ZVAL(getThis(), 1, 0);

0 commit comments

Comments
 (0)