jani                                     Fri, 11 Dec 2009 15:42:16 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=291992

Log:
MF53:- Fixed bug #45392 (ob_start()/ob_end_clean() and memory_limit) #Ilia..

Bug: http://bugs.php.net/45392 (Closed) ob_start()/ob_end_clean() and 
memory_limit
      
Changed paths:
    U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===================================================================
--- php/php-src/trunk/main/main.c       2009-12-11 15:38:15 UTC (rev 291991)
+++ php/php-src/trunk/main/main.c       2009-12-11 15:42:16 UTC (rev 291992)
@@ -1667,7 +1667,15 @@

        /* 3. Flush all output buffers */
        zend_try {
-               if (SG(request_info).headers_only) {
+               zend_bool send_buffer = SG(request_info).headers_only ? 0 : 1;
+
+               if (CG(unclean_shutdown) && PG(last_error_type) == E_ERROR &&
+                       PG(memory_limit) < zend_memory_usage(1 TSRMLS_CC)
+               ) {
+                       send_buffer = 0;
+               }
+
+               if (!send_buffer) {
                        php_output_discard_all(TSRMLS_C);
                } else {
                        php_output_end_all(TSRMLS_C);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to