From: Ilia Alshanetsky Date: Sun, 19 Apr 2009 15:00:11 +0000 (+0000) Subject: MFB: Fixed bug #47937 (system() calls sapi_flush() regardless of output X-Git-Tag: php-5.4.0alpha1~191^2~3905 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b7216499147e5b69be7957748c2b708d08980df;p=php MFB: Fixed bug #47937 (system() calls sapi_flush() regardless of output buffering) --- diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 94f1a60a8e..352d349f57 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -112,7 +112,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;