Skip to content

Commit 7b030ed

Browse files
authored
PHPC-2486: Require non-null namespace and database arguments in Manager (#1963)
1 parent bbf5781 commit 7b030ed

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/MongoDB/Manager.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ static PHP_METHOD(MongoDB_Driver_Manager, executeCommand)
285285
uint32_t server_id = 0;
286286

287287
PHONGO_PARSE_PARAMETERS_START(2, 3)
288-
Z_PARAM_STRING_OR_NULL(db, db_len)
288+
Z_PARAM_STRING(db, db_len)
289289
Z_PARAM_OBJECT_OF_CLASS(command, phongo_command_ce)
290290
Z_PARAM_OPTIONAL
291291
Z_PARAM_ZVAL_OR_NULL(options)
@@ -329,7 +329,7 @@ static PHP_METHOD(MongoDB_Driver_Manager, executeReadCommand)
329329
zval* zsession = NULL;
330330

331331
PHONGO_PARSE_PARAMETERS_START(2, 3)
332-
Z_PARAM_STRING_OR_NULL(db, db_len)
332+
Z_PARAM_STRING(db, db_len)
333333
Z_PARAM_OBJECT_OF_CLASS(command, phongo_command_ce)
334334
Z_PARAM_OPTIONAL
335335
Z_PARAM_ARRAY_OR_NULL(options)
@@ -372,7 +372,7 @@ static PHP_METHOD(MongoDB_Driver_Manager, executeWriteCommand)
372372
zval* zsession = NULL;
373373

374374
PHONGO_PARSE_PARAMETERS_START(2, 3)
375-
Z_PARAM_STRING_OR_NULL(db, db_len)
375+
Z_PARAM_STRING(db, db_len)
376376
Z_PARAM_OBJECT_OF_CLASS(command, phongo_command_ce)
377377
Z_PARAM_OPTIONAL
378378
Z_PARAM_ARRAY_OR_NULL(options)
@@ -410,7 +410,7 @@ static PHP_METHOD(MongoDB_Driver_Manager, executeReadWriteCommand)
410410
zval* zsession = NULL;
411411

412412
PHONGO_PARSE_PARAMETERS_START(2, 3)
413-
Z_PARAM_STRING_OR_NULL(db, db_len)
413+
Z_PARAM_STRING(db, db_len)
414414
Z_PARAM_OBJECT_OF_CLASS(command, phongo_command_ce)
415415
Z_PARAM_OPTIONAL
416416
Z_PARAM_ARRAY_OR_NULL(options)
@@ -449,7 +449,7 @@ static PHP_METHOD(MongoDB_Driver_Manager, executeQuery)
449449
zval* zsession = NULL;
450450

451451
PHONGO_PARSE_PARAMETERS_START(2, 3)
452-
Z_PARAM_STRING_OR_NULL(namespace, namespace_len)
452+
Z_PARAM_STRING(namespace, namespace_len)
453453
Z_PARAM_OBJECT_OF_CLASS(query, phongo_query_ce)
454454
Z_PARAM_OPTIONAL
455455
Z_PARAM_ZVAL_OR_NULL(options)
@@ -493,7 +493,7 @@ static PHP_METHOD(MongoDB_Driver_Manager, executeBulkWrite)
493493
zval* zsession = NULL;
494494

495495
PHONGO_PARSE_PARAMETERS_START(2, 3)
496-
Z_PARAM_STRING_OR_NULL(namespace, namespace_len)
496+
Z_PARAM_STRING(namespace, namespace_len)
497497
Z_PARAM_OBJECT_OF_CLASS(zbulk, phongo_bulkwrite_ce)
498498
Z_PARAM_OPTIONAL
499499
Z_PARAM_ZVAL_OR_NULL(options)

0 commit comments

Comments
 (0)