]> granicus.if.org Git - php/commitdiff
Fixed info literal
authorBob Weinand <bobwei9@hotmail.com>
Sat, 23 Nov 2013 17:36:33 +0000 (18:36 +0100)
committerBob Weinand <bobwei9@hotmail.com>
Sat, 23 Nov 2013 17:36:33 +0000 (18:36 +0100)
phpdbg.c
phpdbg_info.c

index e5aee66d7e98031bd76023921923e586287e10ec..4995918d2e834c0dcfc3ed2528ce3fc5425a4dfa 100644 (file)
--- 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)  /* {{{ */
index ed63cad7142e7e9e8c4b3f9bcafff235287eab5b..f7588fe8aabce77bd576d518e0a5934fe3929241 100644 (file)
@@ -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 {