From: Ilia Alshanetsky Date: Thu, 20 Feb 2003 00:34:24 +0000 (+0000) Subject: MFH X-Git-Tag: php-4.3.2RC1~170 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d67565aedf15ae92319b4c99fddfcad1602d70f;p=php MFH --- diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 4b7bbfc699..9445528048 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -276,11 +276,12 @@ int php_Exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC) RETVAL_STRINGL(buf, l, 1); } } else { - int b, i; + size_t b; - while ((b = fread(buf, 1, buflen, fp)) > 0) { - for (i = 0; i < b; i++) - if (output) (void)PUTC(buf[i]); + while ((b = fread(buf, buflen, 1, fp)) > 0) { + if (output) { + PHPWRITE(buf, b); + } } }