Skip to content

Commit c364420

Browse files
committed
We are throwing exception here, doesn't matter if we are assigning return value
1 parent 407fa91 commit c364420

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

php_phongo.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -561,12 +561,10 @@ bool phongo_execute_write(mongoc_client_t *client, char *namespace, mongoc_bulk_
561561
if (!hint) {
562562
zval *e = phongo_throw_exception(PHONGO_ERROR_WRITE_FAILED TSRMLS_CC, "%s", error.message);
563563

564-
if (return_value_used) {
565-
if (Z_OBJCE_P(e) == php_phongo_writeexception_ce) {
566-
phongo_writeexception_init(e, &reply, hint TSRMLS_CC);
567-
}
568-
bson_destroy(&reply);
564+
if (Z_OBJCE_P(e) == php_phongo_writeexception_ce) {
565+
phongo_writeexception_init(e, &reply, hint TSRMLS_CC);
569566
}
567+
bson_destroy(&reply);
570568

571569
return false;
572570
}

0 commit comments

Comments
 (0)