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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index 526d9e98cc..e5fb467bb2 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -130,7 +130,7 @@ PHPAPI int php_exec(int type, char *cmd, zval *array, zval *return_value TSRMLS_
}
if (bufl) {
/* strip trailing whitespaces if we have not done so already */
- if ((type == 2 && bufl && !l) || type != 2) {
+ if ((type == 2 && buf != b) || type != 2) {
l = bufl;
while (l-- && isspace(((unsigned char *)buf)[l]));
if (l != (bufl - 1)) {