zend_hash_index_update(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], opline, &new_break, sizeof(phpdbg_breakline_t), NULL);
- phpdbg_notice("Breakpoint #%d added at %#lx%s",
+ phpdbg_notice("Breakpoint #%d added at %#lx",
new_break.id, new_break.opline);
} else {
phpdbg_notice("Breakpoint exists at %#lx", opline);
default: {
phpdbg_writeln(
- "\tInternal Method %s::%s()", (*ce)->name, method->common.function_name);
+ "\tInternal %s::%s()", (*ce)->name, method->common.function_name);
}
}
}
void phpdbg_print(int type TSRMLS_DC, const char *format, ...) /* {{{ */
{
char *buffer = NULL;
- va_list args;
+ va_list args = {0};
- va_start(args, format);
- vspprintf(&buffer, 0, format, args);
- va_end(args);
+ if (format != NULL && strlen(format) > 0L) {
+ va_start(args, format);
+ vspprintf(&buffer, 0, format, args);
+ va_end(args);
+ }
/* TODO(anyone) colours */