]> granicus.if.org Git - php/commitdiff
fread already detects EOF
authorTomas V.V.Cox <cox@php.net>
Fri, 31 May 2002 18:49:47 +0000 (18:49 +0000)
committerTomas V.V.Cox <cox@php.net>
Fri, 31 May 2002 18:49:47 +0000 (18:49 +0000)
pear/System.php

index 3fd25e082fb2c347c09802d0d4f15cff398bd0af..47367e5441234c48f3d602e1c64e797902115aca 100644 (file)
@@ -292,8 +292,7 @@ class System
                 System::raiseError("Could not open $file");
                 continue;
             }
-            while(!feof($fd)) {
-                $cont = fread($fd, 2048);
+            while ($cont = fread($fd, 2048)) {
                 if (isset($outputfd)) {
                     fwrite($outputfd, $cont);
                 } else {