Skip to content

Commit c8dea7a

Browse files
committed
Restored code for BOOL variables
1 parent 9a01fe7 commit c8dea7a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ext/oci8/oci8_statement.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,12 @@ int php_oci_bind_post_exec(zval *data)
10831083
}
10841084
break;
10851085
}
1086+
} else if ((Z_TYPE_P(bind->zval) == IS_TRUE) || (Z_TYPE_P(bind->zval) == IS_FALSE)) {
1087+
/* This convetrsion is done on purpose (ext/oci8 uses LVAL as a temorary value) */
1088+
if (Z_LVAL_P(bind->zval) == 0)
1089+
ZVAL_BOOL(bind->zval, FALSE);
1090+
else if (Z_LVAL_P(bind->zval) == 1)
1091+
ZVAL_BOOL(bind->zval, TRUE);
10861092
}
10871093

10881094
return 0;

0 commit comments

Comments
 (0)