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

ext/standard/exec.c

index 94f1a60a8e53c3830822b1ea53944ad222945c20..352d349f573c9125217c7221347029cd125a70ce 100644 (file)
@@ -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;