From 26183225064df2a513e19aee36a1f73f9d7eea36 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Fri, 25 Nov 2005 03:23:17 +0000 Subject: [PATCH] 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. --- ext/pdo/pdo_stmt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index ec717347487..4f7c74eaeba 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;