Skip to content

Commit 61b4845

Browse files
committed
Merge pull request #23 from bwoebi/info_literal_fix
Info literal fix
2 parents 22b2478 + 003fbd0 commit 61b4845

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

phpdbg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ static void php_sapi_phpdbg_register_vars(zval *track_vars_array TSRMLS_DC) /* {
338338

339339
static inline int php_sapi_phpdbg_ub_write(const char *message, unsigned int length TSRMLS_DC) /* {{{ */
340340
{
341-
return phpdbg_write(message);
341+
return phpdbg_write("%s", message);
342342
} /* }}} */
343343

344344
static inline void php_sapi_phpdbg_flush(void *context) /* {{{ */

phpdbg_info.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,13 @@ PHPDBG_INFO(literal) /* {{{ */
172172
}
173173

174174
while (literal < ops->last_literal) {
175-
phpdbg_write("|-------- C%lu -------> [", literal);
176-
zend_print_zval(
177-
&ops->literals[literal].constant, 0);
178-
phpdbg_write("]");
179-
phpdbg_writeln(EMPTY);
175+
if (Z_TYPE(ops->literals[literal].constant) != IS_NULL) {
176+
phpdbg_write("|-------- C%lu -------> [", literal);
177+
zend_print_zval(
178+
&ops->literals[literal].constant, 0);
179+
phpdbg_write("]");
180+
phpdbg_writeln(EMPTY);
181+
}
180182
literal++;
181183
}
182184
} else {

0 commit comments

Comments
 (0)