Skip to content

Commit 583b9f3

Browse files
jmikoladerickr
authored andcommitted
PHPC-400: Compare WriteConcern journal arg with IS_TRUE
1 parent e85604f commit 583b9f3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/MongoDB/WriteConcern.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ PHP_METHOD(WriteConcern, __construct)
9090
switch(ZEND_NUM_ARGS()) {
9191
case 3:
9292
if (Z_TYPE_P(journal) != IS_NULL) {
93+
#ifdef ZEND_ENGINE_3
94+
mongoc_write_concern_set_journal(intern->write_concern, Z_TYPE_P(journal) == IS_TRUE);
95+
#else
9396
mongoc_write_concern_set_journal(intern->write_concern, Z_BVAL_P(journal));
97+
#endif
9498
}
9599
/* fallthrough */
96100
case 2:

0 commit comments

Comments
 (0)