]> granicus.if.org Git - php/commitdiff
(PHP passthru) Shouldn't return anything.
authorAndrei Zmievski <andrei@php.net>
Fri, 11 Feb 2000 19:16:36 +0000 (19:16 +0000)
committerAndrei Zmievski <andrei@php.net>
Fri, 11 Feb 2000 19:16:36 +0000 (19:16 +0000)
This fixes bugs #3428 and #3430.

ext/standard/exec.c

index f12e3dd557c5303869969c7635d80d9643ec2848..5f009d508d0ac9c9bf5ad0405a23d4b276890274 100644 (file)
@@ -169,7 +169,7 @@ static int _Exec(int type, char *cmd, pval *array, pval *return_value)
        } else {
                int b, i;
 
-               while ((b = fread(buf, 1, sizeof(buf), fp)) > 0) {
+               while ((b = fread(buf, 1, buflen, fp)) > 0) {
                        for (i = 0; i < b; i++)
                                if (output) (void)PUTC(buf[i]);
                }
@@ -181,8 +181,6 @@ static int _Exec(int type, char *cmd, pval *array, pval *return_value)
                
                tmp = php_addslashes(buf, 0, &len, 0);
                RETVAL_STRINGL(tmp,len,0);
-       } else {
-               RETVAL_STRING(buf,1);
        }
        
        ret = pclose(fp);