mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Avoid crashing if somehow, output is sent in a new thread tha had no requests
This commit is contained in:
parent
a7bff5d8f1
commit
ff11c36dc5
2 changed files with 16 additions and 4 deletions
|
@ -43,10 +43,16 @@ int output_globals_id;
|
|||
php_output_globals output_globals;
|
||||
#endif
|
||||
|
||||
static php_default_output_func(const char *str, uint str_len)
|
||||
{
|
||||
fwrite(str, 1, str_len, stderr);
|
||||
}
|
||||
|
||||
|
||||
static void php_output_init_globals(OLS_D)
|
||||
{
|
||||
OG(php_body_write) = NULL;
|
||||
OG(php_header_write) = NULL;
|
||||
OG(php_body_write) = php_default_output_func;
|
||||
OG(php_header_write) = php_default_output_func;
|
||||
OG(implicit_flush) = 0;
|
||||
OG(output_start_filename) = NULL;
|
||||
OG(output_start_lineno) = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue