summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/mbstring/tests/common.inc53
-rw-r--r--ext/oci8/oci8.c4
2 files changed, 3 insertions, 54 deletions
diff --git a/ext/mbstring/tests/common.inc b/ext/mbstring/tests/common.inc
deleted file mode 100644
index d4d1d9a495..0000000000
--- a/ext/mbstring/tests/common.inc
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-/*
- * Common definition and Settings
- */
-
-// Custom Error Hanlder for testing
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- global $debug;
-
- $err_type = array (
- 1 => "Error", // E_ERROR
- 2 => "Warning", // E_WARINING
- 4 => "Parsing Error", // E_PARSE
- 8 => "Notice", // E_NOTICE
- 16 => "Core Error", // E_CORE_ERROR
- 32 => "Core Warning", // E_CORE_WARNING
- 64 => "Compile Error", // E_COMPILE_ERROR
- 128 => "Compile Warning", // E_COMPILE_WARNING
- 256 => "User Error", // E_USER_ERROR
- 512 => "User Warning", // E_USER_WARMING
- 1024=> "User Notice" // E_USER_NOTICE
- );
-
- if (!empty($debug)) {
- printf("%s: %s (%d)\n", $err_type[$err_no], $err_msg, $linenum);
- }
- else {
- printf("ERR: %s\n",$err_type[$err_no]);
- }
-}
-
-set_error_handler('test_error_handler');
-
-
-// Var def for testing
-$t_ary = array(
- 's1' => '日本語EUC-JPの文字列',
- 's2' => 'English Text'
- );
-
-class tc
-{
- var $s1 = '日本語EUC-JPの文字列';
- var $s2 = 'English Text';
-
- function tc()
- {
- }
-}
-
-$t_obj = new tc;
-
-?> \ No newline at end of file
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 68e3d41142..a2b0f01a5f 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)) {