Skip to content

Commit 813d7b8

Browse files
tanlisujmikola
authored andcommitted
PHPC-1934: Check for uninitialized intern in ServerDescription get_properties_hash (#1247)
1 parent 0d8cafe commit 813d7b8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/MongoDB/ServerDescription.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ HashTable* php_phongo_serverdescription_get_properties_hash(phongo_compat_object
178178

179179
PHONGO_GET_PROPERTY_HASH_INIT_PROPS(is_debug, intern, props, 6);
180180

181+
if (!intern->server_description) {
182+
return props;
183+
}
184+
181185
{
182186
zval host, port, type;
183187
mongoc_host_list_t* host_list = mongoc_server_description_host(intern->server_description);

0 commit comments

Comments
 (0)