From 8b7216499147e5b69be7957748c2b708d08980df Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sun, 19 Apr 2009 15:00:11 +0000 Subject: [PATCH] MFB: Fixed bug #47937 (system() calls sapi_flush() regardless of output buffering) --- ext/standard/exec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 94f1a60a8e5..352d349f573 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;