Skip to content

Commit

Permalink
Restored code for BOOL variables
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Oct 2, 2017
1 parent 9a01fe7 commit c8dea7a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ext/oci8/oci8_statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,12 @@ int php_oci_bind_post_exec(zval *data)
}
break;
}
} else if ((Z_TYPE_P(bind->zval) == IS_TRUE) || (Z_TYPE_P(bind->zval) == IS_FALSE)) {
/* This convetrsion is done on purpose (ext/oci8 uses LVAL as a temorary value) */
if (Z_LVAL_P(bind->zval) == 0)
ZVAL_BOOL(bind->zval, FALSE);
else if (Z_LVAL_P(bind->zval) == 1)
ZVAL_BOOL(bind->zval, TRUE);
}

return 0;
Expand Down

0 comments on commit c8dea7a

Please sign in to comment.