mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Fixed bug #45392 (ob_start()/ob_end_clean() and memory_limit).
This commit is contained in:
parent
2c98da2d17
commit
fcc0fdd125
1
NEWS
1
NEWS
@ -19,6 +19,7 @@ PHP NEWS
|
||||
- Fixed bug #45928 (large scripts from stdin are stripped at 16K border).
|
||||
(Christian Schneider, Arnaud)
|
||||
- Fixed bug #45911 (Cannot disable ext/hash). (Arnaud)
|
||||
- Fixed bug #45392 (ob_start()/ob_end_clean() and memory_limit). (Ilia)
|
||||
- Fixed bug #45382 (timeout bug in stream_socket_enable_crypto).
|
||||
(vnegrier at optilian dot com, Ilia
|
||||
|
||||
|
@ -1478,7 +1478,12 @@ void php_request_shutdown(void *dummy)
|
||||
|
||||
/* 3. Flush all output buffers */
|
||||
zend_try {
|
||||
php_end_ob_buffers((zend_bool)(SG(request_info).headers_only?0:1) TSRMLS_CC);
|
||||
zend_bool send_buffer = SG(request_info).headers_only ? 0 : 1;
|
||||
if (CG(unclean_shutdown) && PG(last_error_type) == E_ERROR &&
|
||||
!OG(active_ob_buffer).chunk_size && PG(memory_limit) < zend_memory_usage(1 TSRMLS_CC)) {
|
||||
send_buffer = 0;
|
||||
}
|
||||
php_end_ob_buffers(send_buffer TSRMLS_CC);
|
||||
} zend_end_try();
|
||||
|
||||
/* 4. Send the set HTTP headers (note: This must be done AFTER php_end_ob_buffers() !!) */
|
||||
|
Loading…
Reference in New Issue
Block a user