]> granicus.if.org Git - php/commitdiff
Fixed bug #47937 (system() calls sapi_flush() regardless of output
authorIlia Alshanetsky <iliaa@php.net>
Sun, 19 Apr 2009 14:59:52 +0000 (14:59 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 19 Apr 2009 14:59:52 +0000 (14:59 +0000)
buffering)

ext/standard/exec.c

index 71f5093d31ab0b69fc81d567b9382cd155b7013c..c4378186bd0f5a247e2c809a5a7224d18cb04ade 100644 (file)
@@ -131,7 +131,9 @@ PHPAPI int php_exec(int type, char *cmd, zval *array, zval *return_value TSRMLS_
 
                        if (type == 1) {
                                PHPWRITE(buf, bufl);
-                               sapi_flush(TSRMLS_C);
+                               if (OG(ob_nesting_level) < 1) {
+                                       sapi_flush(TSRMLS_C);
+                               }
                        } else if (type == 2) {
                                /* strip trailing whitespaces */
                                l = bufl;