diff options
| author | Adam Baratz <adambaratz@php.net> | 2017-06-29 11:40:56 +0200 |
|---|---|---|
| committer | Adam Baratz <adambaratz@php.net> | 2017-06-29 11:40:56 +0200 |
| commit | f15790ec73decf5a8495494a069ba6c83806ef92 (patch) | |
| tree | 001e6d667af44b99f4a82d1ab75c0b2cc4357baa /ext/pdo/pdo_stmt.c | |
| parent | a99c5f28c5354f0696cecc9155c1023aac1596f2 (diff) | |
| parent | 08089f014cee7a43fac9ee75d677fcb93c0a5297 (diff) | |
| download | php-git-f15790ec73decf5a8495494a069ba6c83806ef92.tar.gz | |
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
Fixed #69356: PDOStatement::debugDumpParams() truncates query
Diffstat (limited to 'ext/pdo/pdo_stmt.c')
| -rw-r--r-- | ext/pdo/pdo_stmt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 6aaec93657..b953739a6a 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -2104,9 +2104,10 @@ static PHP_METHOD(PDOStatement, debugDumpParams) RETURN_FALSE; } - php_stream_printf(out, "SQL: [%zd] %.*s\n", - stmt->query_stringlen, - (int) stmt->query_stringlen, stmt->query_string); + /* break into multiple operations so query string won't be truncated at FORMAT_CONV_MAX_PRECISION */ + php_stream_printf(out, "SQL: [%zd] ", stmt->query_stringlen); + php_stream_write(out, stmt->query_string, stmt->query_stringlen); + php_stream_write(out, "\n", 1); php_stream_printf(out, "Params: %d\n", stmt->bound_params ? zend_hash_num_elements(stmt->bound_params) : 0); |
