diff --git a/src/Csv.php b/src/Csv.php index 094e353..deeba47 100644 --- a/src/Csv.php +++ b/src/Csv.php @@ -369,13 +369,11 @@ class Csv { } if (empty($input)) { - // todo: but why true? - return true; + return false; } $this->init($offset, $limit, $conditions); - if (strlen($input) <= PHP_MAXPATHLEN && is_readable($input)) { $this->file = $input; $this->data = $this->parse_file(); @@ -385,12 +383,7 @@ class Csv { $this->data = $this->parse_string(); } - if ($this->data === false) { - return false; - } - - return true; - + return $this->data !== false; } /**