summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>2002-04-14 18:27:27 +0000
committerThies C. Arntzen <thies@php.net>2002-04-14 18:27:27 +0000
commit136240ae461425856bd6129573c63f42f9d5ddf8 (patch)
tree84f5478ba5ead74c934b2cd185e7d51301edf91c
parentf95fbc4e60ec327ce1f200858ff1af1c07fdfa4e (diff)
downloadphp-git-136240ae461425856bd6129573c63f42f9d5ddf8.tar.gz
fix crash bug introduced by last commit
-rw-r--r--ext/oci8/oci8.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 83d466e84d..d9b1ff75be 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -697,7 +697,9 @@ _oci_bind_post_exec(void *data TSRMLS_DC)
if (bind->indicator == -1) { /* NULL */
zval *val = bind->zval;
- *Z_STRVAL_P(val) = '\0'; /* XXX avoid warning in debug mode */
+ if (Z_TYPE_P(val) == IS_STRING && (Z_STRVAL_P(val) != empty_string)) {
+ *Z_STRVAL_P(val) = '\0'; /* XXX avoid warning in debug mode */
+ }
zval_dtor(val);
ZVAL_NULL(val);
} else if (Z_TYPE_P(bind->zval) == IS_STRING && (Z_STRVAL_P(bind->zval) != empty_string)) {