X-Git-Url: https://git.llucax.com/z.facultad/75.43/tp1.git/blobdiff_plain/c5fcf680548c2cb2b2e0bbdae67d1794cbe78eed..3cfdc427066ffa563f292c8267ecb8db8e1fd9d0:/src/lib/file.php?ds=inline diff --git a/src/lib/file.php b/src/lib/file.php index 2e3b403..812cfcc 100644 --- a/src/lib/file.php +++ b/src/lib/file.php @@ -52,7 +52,7 @@ function fgetallcsv($filename, $delim = ',') { if (($f = fopen($filename, 'r')) === false) return false; $data = array(); - while (!feof($f)) $data[] = fgetcsv($f, 4096, $delim); + while ($row = fgetcsv($f, 4096, $delim)) $data[] = $row; fclose($f); return $data; } @@ -65,7 +65,7 @@ function fgetallcsv($filename, $delim = ',') */ function fsearchcsv($filename, $what, $id = 0, $delim = ',') { - if (($f = fopen($filename, 'r')) === false) return false; + if (($f = fopen($filename, 'r')) === false) return false; while (!feof($f)) { $d = fgetcsv($f, 4096);