From b9653b8358be22015121e642bca0c2cb9fae99f5 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Wed, 3 Dec 2008 10:18:42 +0000 Subject: [PATCH] MFH --- ext/pdo/pdo_stmt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index f5b26555ea..f82261f6a8 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -2203,10 +2203,12 @@ static PHP_METHOD(PDOStatement, debugDumpParams) char *str; uint len; ulong num; + int res; - if (zend_hash_get_current_key_ex(stmt->bound_params, &str, &len, &num, 0, &pos) == HASH_KEY_IS_LONG) { + res = zend_hash_get_current_key_ex(stmt->bound_params, &str, &len, &num, 0, &pos); + if (res == HASH_KEY_IS_LONG) { php_stream_printf(out TSRMLS_CC, "Key: Position #%ld:\n", num); - } else { + } else if (res == HASH_KEY_IS_STRING) { php_stream_printf(out TSRMLS_CC, "Key: Name: [%d] %.*s\n", len, len, str); } -- 2.50.1