From bd7f4375a3dabf883fe1f018a89d07a39ae36af5 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sun, 19 Apr 2009 14:59:52 +0000 Subject: [PATCH] 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 71f5093d31..c4378186bd 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -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; -- 2.50.1