File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ PHP NEWS
19
19
- Fixed bug #45928 (large scripts from stdin are stripped at 16K border).
20
20
(Christian Schneider, Arnaud)
21
21
- Fixed bug #45911 (Cannot disable ext/hash). (Arnaud)
22
+ - Fixed bug #45392 (ob_start()/ob_end_clean() and memory_limit). (Ilia)
22
23
- Fixed bug #45382 (timeout bug in stream_socket_enable_crypto).
23
24
(vnegrier at optilian dot com, Ilia
24
25
Original file line number Diff line number Diff line change @@ -1478,7 +1478,12 @@ void php_request_shutdown(void *dummy)
1478
1478
1479
1479
/* 3. Flush all output buffers */
1480
1480
zend_try {
1481
- php_end_ob_buffers ((zend_bool )(SG (request_info ).headers_only ?0 :1 ) TSRMLS_CC );
1481
+ zend_bool send_buffer = SG (request_info ).headers_only ? 0 : 1 ;
1482
+ if (CG (unclean_shutdown ) && PG (last_error_type ) == E_ERROR &&
1483
+ !OG (active_ob_buffer ).chunk_size && PG (memory_limit ) < zend_memory_usage (1 TSRMLS_CC )) {
1484
+ send_buffer = 0 ;
1485
+ }
1486
+ php_end_ob_buffers (send_buffer TSRMLS_CC );
1482
1487
} zend_end_try ();
1483
1488
1484
1489
/* 4. Send the set HTTP headers (note: This must be done AFTER php_end_ob_buffers() !!) */
You can’t perform that action at this time.
0 commit comments