@@ -55,10 +55,6 @@ mongoc_bulkwriteopts_t* phongo_bwc_assemble_opts(php_phongo_bulkwritecommand_t*
55
55
mongoc_bulkwriteopts_set_ordered (opts , intern -> ordered );
56
56
mongoc_bulkwriteopts_set_verboseresults (opts , intern -> verbose );
57
57
58
- if (intern -> write_concern ) {
59
- mongoc_bulkwriteopts_set_writeconcern (opts , intern -> write_concern );
60
- }
61
-
62
58
return opts ;
63
59
}
64
60
@@ -139,7 +135,6 @@ static PHP_METHOD(MongoDB_Driver_BulkWriteCommand, __construct)
139
135
intern -> num_ops = 0 ;
140
136
intern -> ordered = true;
141
137
intern -> verbose = false;
142
- intern -> write_concern = NULL ;
143
138
144
139
if (!zoptions ) {
145
140
return ;
@@ -183,17 +178,6 @@ static PHP_METHOD(MongoDB_Driver_BulkWriteCommand, __construct)
183
178
if (php_array_existsc (zoptions , "verboseResults" )) {
184
179
intern -> verbose = php_array_fetchc_bool (zoptions , "verboseResults" );
185
180
}
186
-
187
- if (php_array_existsc (zoptions , "writeConcern" )) {
188
- zval * value = php_array_fetchc_deref (zoptions , "writeConcern" );
189
-
190
- if (Z_TYPE_P (value ) != IS_OBJECT || !instanceof_function (Z_OBJCE_P (value ), php_phongo_writeconcern_ce )) {
191
- phongo_throw_exception (PHONGO_ERROR_INVALID_ARGUMENT , "Expected \"writeConcern\" option to be %s, %s given" , ZSTR_VAL (php_phongo_writeconcern_ce -> name ), zend_zval_type_name (value ));
192
- return ;
193
- }
194
-
195
- intern -> write_concern = mongoc_write_concern_copy (phongo_write_concern_from_zval (value ));
196
- }
197
181
}
198
182
199
183
static PHP_METHOD (MongoDB_Driver_BulkWriteCommand , count )
@@ -763,10 +747,6 @@ static void php_phongo_bulkwritecommand_free_object(zend_object* object)
763
747
if (!Z_ISUNDEF (intern -> session )) {
764
748
zval_ptr_dtor (& intern -> session );
765
749
}
766
-
767
- if (intern -> write_concern ) {
768
- mongoc_write_concern_destroy (intern -> write_concern );
769
- }
770
750
}
771
751
772
752
static zend_object * php_phongo_bulkwritecommand_create_object (zend_class_entry * class_type )
@@ -828,15 +808,6 @@ static HashTable* php_phongo_bulkwritecommand_get_debug_info(zend_object* object
828
808
ADD_ASSOC_NULL_EX (& retval , "session" );
829
809
}
830
810
831
- if (intern -> write_concern ) {
832
- zval write_concern ;
833
-
834
- php_phongo_write_concern_to_zval (& write_concern , intern -> write_concern );
835
- ADD_ASSOC_ZVAL_EX (& retval , "write_concern" , & write_concern );
836
- } else {
837
- ADD_ASSOC_NULL_EX (& retval , "write_concern" );
838
- }
839
-
840
811
done :
841
812
return Z_ARRVAL (retval );
842
813
}
0 commit comments