summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_api.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2008-03-20 15:34:09 +0000
committerAndrey Hristov <andrey@php.net>2008-03-20 15:34:09 +0000
commit9732763eca9ca2453a7fa6450de9ddf9ab0d224a (patch)
tree98d626f255a846b93aec1103ee5b81fb8c6a1df9 /ext/mysqli/mysqli_api.c
parent46df4529bebeec51619b6759228903743444d9f6 (diff)
downloadphp-git-9732763eca9ca2453a7fa6450de9ddf9ab0d224a.tar.gz
Small fix and a test case to prove it
Diffstat (limited to 'ext/mysqli/mysqli_api.c')
-rw-r--r--ext/mysqli/mysqli_api.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index 509fa81ee9..a2f1ab2b85 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -749,8 +749,10 @@ PHP_FUNCTION(mysqli_stmt_execute)
switch (stmt->stmt->params[i].buffer_type) {
case MYSQL_TYPE_VAR_STRING:
if (UG(unicode) && Z_TYPE_P(the_var) == IS_UNICODE) {
- php_mysqli_stmt_copy_it(&copies, stmt->param.vars[i], stmt->param.var_cnt, i);
- the_var = copies[i];
+ if (the_var == stmt->param.vars[i]) {
+ php_mysqli_stmt_copy_it(&copies, stmt->param.vars[i], stmt->param.var_cnt, i);
+ the_var = copies[i];
+ }
zval_unicode_to_string_ex(the_var, UG(utf8_conv) TSRMLS_CC);
} else {
if (the_var == stmt->param.vars[i] && Z_TYPE_P(stmt->param.vars[i]) != IS_STRING) {