summaryrefslogtreecommitdiff
path: root/ext/standard/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/exec.c')
-rw-r--r--ext/standard/exec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index b79eb37c04..da8b5712cf 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -178,8 +178,9 @@ PHPAPI int php_exec(int type, char *cmd, zval *array, zval *return_value)
RETVAL_EMPTY_STRING();
}
} else {
- while((bufl = php_stream_read(stream, buf, EXEC_INPUT_BUF)) > 0) {
- PHPWRITE(buf, bufl);
+ ssize_t read;
+ while ((read = php_stream_read(stream, buf, EXEC_INPUT_BUF)) > 0) {
+ PHPWRITE(buf, read);
}
}