@@ -69,17 +69,17 @@ PHP_METHOD(BulkWrite, __construct)
6969 }
7070 zend_restore_error_handling (& error_handling TSRMLS_CC );
7171
72- if (options && php_array_exists (options , "ordered" )) {
73- ordered = php_array_fetch_bool (options , "ordered" );
72+ if (options && php_array_existsc (options , "ordered" )) {
73+ ordered = php_array_fetchc_bool (options , "ordered" );
7474 }
7575
7676 intern -> bulk = phongo_bulkwrite_init (ordered );
7777 intern -> ordered = ordered ;
7878 intern -> bypass = BYPASS_UNSET ;
7979 intern -> num_ops = 0 ;
8080
81- if (options && php_array_exists (options , "bypassDocumentValidation" )) {
82- zend_bool bypass = php_array_fetch_bool (options , "bypassDocumentValidation" );
81+ if (options && php_array_existsc (options , "bypassDocumentValidation" )) {
82+ zend_bool bypass = php_array_fetchc_bool (options , "bypassDocumentValidation" );
8383 mongoc_bulk_operation_set_bypass_document_validation (intern -> bulk , bypass );
8484 intern -> bypass = bypass ;
8585 }
@@ -159,8 +159,8 @@ PHP_METHOD(BulkWrite, update)
159159 phongo_zval_to_bson (newObj , PHONGO_BSON_NONE , bupdate , NULL TSRMLS_CC );
160160
161161 if (updateOptions ) {
162- flags |= php_array_fetch_bool (updateOptions , "multi" ) ? MONGOC_UPDATE_MULTI_UPDATE : 0 ;
163- flags |= php_array_fetch_bool (updateOptions , "upsert" ) ? MONGOC_UPDATE_UPSERT : 0 ;
162+ flags |= php_array_fetchc_bool (updateOptions , "multi" ) ? MONGOC_UPDATE_MULTI_UPDATE : 0 ;
163+ flags |= php_array_fetchc_bool (updateOptions , "upsert" ) ? MONGOC_UPDATE_UPSERT : 0 ;
164164 }
165165
166166 if (flags & MONGOC_UPDATE_MULTI_UPDATE ) {
@@ -212,7 +212,7 @@ PHP_METHOD(BulkWrite, delete)
212212 bson = bson_new ();
213213 phongo_zval_to_bson (query , PHONGO_BSON_NONE , bson , NULL TSRMLS_CC );
214214
215- if (deleteOptions && php_array_fetch_bool (deleteOptions , "limit" )) {
215+ if (deleteOptions && php_array_fetchc_bool (deleteOptions , "limit" )) {
216216 mongoc_bulk_operation_remove_one (intern -> bulk , bson );
217217 } else {
218218 mongoc_bulk_operation_remove (intern -> bulk , bson );
0 commit comments