diff options
Diffstat (limited to 'ext/pdo/pdo_stmt.c')
-rwxr-xr-x | ext/pdo/pdo_stmt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 058d876776..27cb65c2d1 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -2197,14 +2197,14 @@ static PHP_METHOD(PDOStatement, debugDumpParams) uint len; ulong num; - if (zend_hash_get_current_key_ex(stmt->bound_params, &str, &len, &num, 0, &pos) == HASH_KEY_IS_STRING) { - php_stream_printf(out TSRMLS_CC, "Key: Position #%d:\n", num); + if (zend_hash_get_current_key_ex(stmt->bound_params, &str, &len, &num, 0, &pos) == HASH_KEY_IS_LONG) { + php_stream_printf(out TSRMLS_CC, "Key: Position #%ld:\n", num); } else { php_stream_printf(out TSRMLS_CC, "Key: Name: [%d] %.*s\n", len, len, str); } - php_stream_printf(out TSRMLS_CC, "paramno=%d\nname=[%d] %.*s\nis_param=%d\nparam_type=%d\n", - param->paramno, param->namelen, param->namelen, param->name, + php_stream_printf(out TSRMLS_CC, "paramno=%d\nname=[%d] \"%.*s\"\nis_param=%d\nparam_type=%d\n", + param->paramno, param->namelen, param->namelen, param->name ? param->name : "", param->is_param, param->param_type); |