@@ -80,22 +80,18 @@ PHP_METHOD(BulkWrite, __construct)
8080PHP_METHOD (BulkWrite , insert )
8181{
8282 php_phongo_bulkwrite_t * intern ;
83- zend_error_handling error_handling ;
8483 zval * document ;
8584 bson_t * bson ;
8685 bson_t * bson_out = NULL ;
8786 int bson_flags = PHONGO_BSON_ADD_ID ;
8887 (void )return_value_ptr ; (void )return_value_used ;
8988
9089
91- zend_replace_error_handling (EH_THROW , phongo_exception_from_phongo_domain (PHONGO_ERROR_INVALID_ARGUMENT ), & error_handling TSRMLS_CC );
9290 intern = (php_phongo_bulkwrite_t * )zend_object_store_get_object (getThis () TSRMLS_CC );
9391
9492 if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "A" , & document ) == FAILURE ) {
95- zend_restore_error_handling (& error_handling TSRMLS_CC );
9693 return ;
9794 }
98- zend_restore_error_handling (& error_handling TSRMLS_CC );
9995
10096
10197 if (return_value_used ) {
@@ -125,7 +121,6 @@ PHP_METHOD(BulkWrite, insert)
125121PHP_METHOD (BulkWrite , update )
126122{
127123 php_phongo_bulkwrite_t * intern ;
128- zend_error_handling error_handling ;
129124 zval * query ;
130125 zval * newObj ;
131126 zval * updateOptions = NULL ;
@@ -136,14 +131,11 @@ PHP_METHOD(BulkWrite, update)
136131 (void )return_value_ptr ; (void )return_value ; (void )return_value_used ;
137132
138133
139- zend_replace_error_handling (EH_THROW , phongo_exception_from_phongo_domain (PHONGO_ERROR_INVALID_ARGUMENT ), & error_handling TSRMLS_CC );
140134 intern = (php_phongo_bulkwrite_t * )zend_object_store_get_object (getThis () TSRMLS_CC );
141135
142136 if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "AA|a!" , & query , & newObj , & updateOptions ) == FAILURE ) {
143- zend_restore_error_handling (& error_handling TSRMLS_CC );
144137 return ;
145138 }
146- zend_restore_error_handling (& error_handling TSRMLS_CC );
147139
148140
149141 bquery = bson_new ();
@@ -187,21 +179,17 @@ PHP_METHOD(BulkWrite, update)
187179PHP_METHOD (BulkWrite , delete )
188180{
189181 php_phongo_bulkwrite_t * intern ;
190- zend_error_handling error_handling ;
191182 zval * query ;
192183 zval * deleteOptions = NULL ;
193184 bson_t * bson ;
194185 (void )return_value_ptr ; (void )return_value ; (void )return_value_used ;
195186
196187
197- zend_replace_error_handling (EH_THROW , phongo_exception_from_phongo_domain (PHONGO_ERROR_INVALID_ARGUMENT ), & error_handling TSRMLS_CC );
198188 intern = (php_phongo_bulkwrite_t * )zend_object_store_get_object (getThis () TSRMLS_CC );
199189
200190 if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "A|a!" , & query , & deleteOptions ) == FAILURE ) {
201- zend_restore_error_handling (& error_handling TSRMLS_CC );
202191 return ;
203192 }
204- zend_restore_error_handling (& error_handling TSRMLS_CC );
205193
206194
207195 bson = bson_new ();
@@ -221,18 +209,14 @@ PHP_METHOD(BulkWrite, delete)
221209PHP_METHOD (BulkWrite , count )
222210{
223211 php_phongo_bulkwrite_t * intern ;
224- zend_error_handling error_handling ;
225212 (void )return_value_ptr ; (void )return_value ; (void )return_value_used ;
226213
227214
228- zend_replace_error_handling (EH_THROW , phongo_exception_from_phongo_domain (PHONGO_ERROR_INVALID_ARGUMENT ), & error_handling TSRMLS_CC );
229215 intern = (php_phongo_bulkwrite_t * )zend_object_store_get_object (getThis () TSRMLS_CC );
230216
231217 if (zend_parse_parameters_none () == FAILURE ) {
232- zend_restore_error_handling (& error_handling TSRMLS_CC );
233218 return ;
234219 }
235- zend_restore_error_handling (& error_handling TSRMLS_CC );
236220
237221 RETURN_LONG (intern -> bulk -> commands .len );
238222}
0 commit comments