Skip to content

Commit 17c38c5

Browse files
committed
Consolidate PHP 7 conditional in WriteResult debug handler
1 parent ee6d99c commit 17c38c5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/MongoDB/WriteResult.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -525,15 +525,12 @@ HashTable *php_phongo_writeresult_get_debug_info(zval *object, int *is_temp TSRM
525525
zval write_concern;
526526

527527
php_phongo_write_concern_to_zval(&write_concern, intern->write_concern);
528+
ADD_ASSOC_ZVAL_EX(&retval, "writeConcern", &write_concern);
528529
#else
529530
zval *write_concern = NULL;
530531

531532
MAKE_STD_ZVAL(write_concern);
532533
php_phongo_write_concern_to_zval(write_concern, intern->write_concern);
533-
#endif
534-
#if PHP_VERSION_ID >= 70000
535-
ADD_ASSOC_ZVAL_EX(&retval, "writeConcern", &write_concern);
536-
#else
537534
ADD_ASSOC_ZVAL_EX(&retval, "writeConcern", write_concern);
538535
#endif
539536
} else {

0 commit comments

Comments
 (0)