Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion php_phongo.c
Original file line number Diff line number Diff line change
Expand Up @@ -3432,13 +3432,14 @@ void phongo_manager_init(php_phongo_manager_t* manager, const char* uri_string,
#endif

manager->client = php_phongo_make_mongo_client(uri, driverOptions);
mongoc_client_set_error_api(manager->client, MONGOC_ERROR_API_VERSION_2);

if (!manager->client) {
phongo_throw_exception(PHONGO_ERROR_RUNTIME, "Failed to create Manager from URI: '%s'", uri_string);
goto cleanup;
}

mongoc_client_set_error_api(manager->client, MONGOC_ERROR_API_VERSION_2);

#ifdef MONGOC_ENABLE_SSL
if (ssl_opt) {
mongoc_client_set_ssl_opts(manager->client, ssl_opt);
Expand Down