iliaa Wed Sep 17 00:20:30 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/main main.c
/php-src NEWS
Log:
Fixed bug #45392 (ob_start()/ob_end_clean() and memory_limit).
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.33&r2=1.640.2.23.2.57.2.34&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.33
php-src/main/main.c:1.640.2.23.2.57.2.34
--- php-src/main/main.c:1.640.2.23.2.57.2.33 Tue Sep 2 09:45:49 2008
+++ php-src/main/main.c Wed Sep 17 00:20:29 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.640.2.23.2.57.2.33 2008/09/02 09:45:49 dmitry Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.34 2008/09/17 00:20:29 iliaa Exp $ */
/* {{{ includes
*/
@@ -1478,7 +1478,12 @@
/* 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() !!) */
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.320&r2=1.2027.2.547.2.965.2.321&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.320
php-src/NEWS:1.2027.2.547.2.965.2.321
--- php-src/NEWS:1.2027.2.547.2.965.2.320 Tue Sep 16 23:02:16 2008
+++ php-src/NEWS Wed Sep 17 00:20:30 2008
@@ -19,6 +19,7 @@
- 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
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php