Господа, походу баг. Как видно из кода, функция не выполняет предназначения, даже базовое — «сокрытие данных об ошибках», про накопление ничего сказать не могу.
/* Display errors */
if (PG(display_errors) && !PG(during_request_startup)) {
char *printable_stack;
/* We need to see if we have an uncaught exception fatal error now */
if (type == E_ERROR && strncmp(buffer, "Uncaught exception", 18) == 0) {
xdebug_str str = {0, 0, NULL};
char *tmp_buf, *p;
/* find first new line */
p = strchr(buffer, '\n');
/* find last quote */
p = ((char *) zend_memrchr(buffer, '\'', p - buffer)) + 1;
/* Create new buffer */
tmp_buf = calloc(p - buffer + 1, 1);
strncpy(tmp_buf, buffer, p - buffer );
/* Append error */
xdebug_append_error_head(&str, PG(html_errors) TSRMLS_CC);
xdebug_append_error_description(&str, PG(html_errors), error_type_str, tmp_buf, error_filename, error_lineno TSRMLS_CC);
xdebug_append_printable_stack(&str, PG(html_errors) TSRMLS_CC);
xdebug_str_add(&str, XG(last_exception_trace), 0);
xdebug_append_error_footer(&str, PG(html_errors));
php_output_error(str.d TSRMLS_CC);
xdfree(str.d);
free(tmp_buf);
} else {
printable_stack = get_printable_stack(PG(html_errors), error_type_str, buffer, error_filename, error_lineno TSRMLS_CC);
php_output_error(printable_stack TSRMLS_CC);
xdfree(printable_stack);
}
}
if (XG(do_collect_errors)) {
char *printable_stack;
printable_stack = get_printable_stack(PG(html_errors), error_type_str, buffer, error_filename, error_lineno TSRMLS_CC);
xdebug_llist_insert_next(XG(collected_errors), XDEBUG_LLIST_TAIL(XG(collected_errors)), printable_stack);
}