Skip to content

Commit c5a0711

Browse files
committed
PHPC-200: Don't set stream initiator when creating client fails
1 parent bc93899 commit c5a0711

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

php_phongo.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,10 @@ mongoc_client_t *php_phongo_make_mongo_client(const char *uri, zval *driverOptio
12011201
php_stream_context *ctx = NULL;
12021202
mongoc_client_t *client = mongoc_client_new(uri);
12031203

1204+
if (!client) {
1205+
return false;
1206+
}
1207+
12041208
if (driverOptions) {
12051209
zval **tmp;
12061210

0 commit comments

Comments
 (0)