summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2005-11-25 03:23:17 +0000
committerWez Furlong <wez@php.net>2005-11-25 03:23:17 +0000
commit26183225064df2a513e19aee36a1f73f9d7eea36 (patch)
treec176e24d3e324eb09d102ce6f119ca2bd2a6a4e1
parent268ac81e393708494731e249f2400866c3c394eb (diff)
downloadphp-git-26183225064df2a513e19aee36a1f73f9d7eea36.tar.gz
Bug: when stringify fetch mode is on, and the driver returns a string instead
of a stream for a LOB parameter, PDO would incorrectly return NULL for that column.
-rwxr-xr-xext/pdo/pdo_stmt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index ec71734748..4f7c74eaeb 100755
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -517,6 +517,11 @@ static inline void fetch_value(pdo_stmt_t *stmt, zval *dest, int colno, int *typ
} else {
ZVAL_NULL(dest);
}
+ } else {
+ ZVAL_STRINGL(dest, value, value_len, !caller_frees);
+ if (caller_frees) {
+ caller_frees = 0;
+ }
}
break;