mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
Make return value of parseFile() explicit as false if parsing failed
In practise this changes nothing because $this->file_data would typically be empty. The only exception is if the object was reused from a previous parsing operation.
This commit is contained in:
14
src/Csv.php
14
src/Csv.php
@@ -612,13 +612,13 @@ class Csv {
|
||||
$file = $this->file;
|
||||
}
|
||||
|
||||
if (empty($this->file_data)) {
|
||||
/**
|
||||
* @see self::keep_file_data
|
||||
* Usually, _parse_string will clean this
|
||||
* Instead of leaving stale data for the next parseFile call behind.
|
||||
*/
|
||||
$this->load_data($file);
|
||||
/**
|
||||
* @see self::keep_file_data
|
||||
* Usually, _parse_string will clean this
|
||||
* Instead of leaving stale data for the next parseFile call behind.
|
||||
*/
|
||||
if (empty($this->file_data) && !$this->loadFile($file)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !empty($this->file_data) ? $this->_parse_string() : false;
|
||||
|
||||
Reference in New Issue
Block a user