]> granicus.if.org Git - php/commitdiff
MFH
authorIlia Alshanetsky <iliaa@php.net>
Tue, 25 Feb 2003 16:26:55 +0000 (16:26 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 25 Feb 2003 16:26:55 +0000 (16:26 +0000)
ext/standard/exec.c
ext/standard/tests/file/bug22414.phpt

index 94455280487759a6a0a43966f160e19d89d6db21..f6b942e701bdd388382012ec3b6d10d600d8836e 100644 (file)
@@ -278,7 +278,7 @@ int php_Exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC)
        } else {
                size_t b;
 
-               while ((b = fread(buf, buflen, 1, fp)) > 0) {
+               while((b = php_stream_read(stream, buf, EXEC_INPUT_BUF)) > 0) {
                        if (output) {
                                PHPWRITE(buf, b);
                        }
index c67ae2ed66e65150f354bf04cb0d42705d22a9b5..0488a137d76845905b1c203f32a98884da747d70 100644 (file)
@@ -2,8 +2,9 @@
 Bug #22414: passthru() does not read data correctly
 --SKIPIF--
 <?php
-       if (empty(@shell_exec("which cat")) {
-               dir('skip cat binary needed for this test is not avaliable');
+       $cat_path = @shell_exec("which cat");
+       if (empty($cat_path)) {
+               die('skip cat binary needed for this test is not avaliable');   
        }
 ?>
 --POST--