Skip to content

Commit 67c5e8c

Browse files
committed
PHPC-834: Process readPreference for executeCommand() on PHP 5.x
1 parent 87d7024 commit 67c5e8c

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
@@ -602,7 +602,7 @@ static int phongo_execute_parse_options(mongoc_client_t* client, int server_id,
602602
if (!process_read_concern(*driver_option, mongoc_opts TSRMLS_CC)) {
603603
return false;
604604
}
605-
} else if ((!strcasecmp(string_key, "readPreference")) && (type == PHONGO_COMMAND_READ)) {
605+
} else if ((!strcasecmp(string_key, "readPreference")) && (type == PHONGO_COMMAND_READ || type == PHONGO_COMMAND_RAW)) {
606606
if (!process_read_preference(*driver_option, mongoc_opts, zreadPreference, client, server_id TSRMLS_CC)) {
607607
return false;
608608
}

0 commit comments

Comments
 (0)