mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
fix usage of php_output_(de)activate; I guess this code doesn't bother about one more hack;
This commit is contained in:
parent
29c8658dc8
commit
7aedbed543
@ -1755,11 +1755,22 @@ static int php_cli_server_send_error_page(php_cli_server *server, php_cli_server
|
||||
int err = 0;
|
||||
zval *style = NULL;
|
||||
zend_try {
|
||||
if (!SG(sapi_started)) {
|
||||
php_output_activate(TSRMLS_C);
|
||||
}
|
||||
php_output_start_user(NULL, 0, PHP_OUTPUT_HANDLER_STDFLAGS TSRMLS_CC);
|
||||
php_info_print_style(TSRMLS_C);
|
||||
MAKE_STD_ZVAL(style);
|
||||
php_output_get_contents(style TSRMLS_CC);
|
||||
php_output_discard(TSRMLS_C);
|
||||
if (!SG(sapi_started)) {
|
||||
static int (*send_header_func)(sapi_headers_struct * TSRMLS_DC);
|
||||
send_header_func = sapi_module.send_headers;
|
||||
/* we don't want the header to be sent now */
|
||||
sapi_module.send_headers = sapi_cli_server_discard_headers;
|
||||
php_output_deactivate(TSRMLS_C);
|
||||
sapi_module.send_headers = send_header_func;
|
||||
}
|
||||
if (style && Z_STRVAL_P(style)) {
|
||||
char *block = pestrndup(Z_STRVAL_P(style), Z_STRLEN_P(style), 1);
|
||||
php_cli_server_chunk *chunk = php_cli_server_chunk_heap_new(block, block, Z_STRLEN_P(style));
|
||||
|
Loading…
Reference in New Issue
Block a user