From eb67cb6914c593b19cb085619cb3a9f2ff6185a6 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Sat, 23 Nov 2013 18:36:33 +0100 Subject: [PATCH] Fixed info literal --- phpdbg.c | 2 +- phpdbg_info.c | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/phpdbg.c b/phpdbg.c index e5aee66d7e9..4995918d2e8 100644 --- a/phpdbg.c +++ b/phpdbg.c @@ -338,7 +338,7 @@ static void php_sapi_phpdbg_register_vars(zval *track_vars_array TSRMLS_DC) /* { static inline int php_sapi_phpdbg_ub_write(const char *message, unsigned int length TSRMLS_DC) /* {{{ */ { - return phpdbg_write(message); + return phpdbg_write("%s", message); } /* }}} */ static inline void php_sapi_phpdbg_flush(void *context) /* {{{ */ diff --git a/phpdbg_info.c b/phpdbg_info.c index ed63cad7142..f7588fe8aab 100644 --- a/phpdbg_info.c +++ b/phpdbg_info.c @@ -172,11 +172,13 @@ PHPDBG_INFO(literal) /* {{{ */ } while (literal < ops->last_literal) { - phpdbg_write("|-------- C%lu -------> [", literal); - zend_print_zval( - &ops->literals[literal].constant, 0); - phpdbg_write("]"); - phpdbg_writeln(EMPTY); + if (Z_TYPE(ops->literals[literal].constant) != IS_NULL) { + phpdbg_write("|-------- C%lu -------> [", literal); + zend_print_zval( + &ops->literals[literal].constant, 0); + phpdbg_write("]"); + phpdbg_writeln(EMPTY); + } literal++; } } else {