We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e0ae357 + 4b5c40d commit 6adffb6Copy full SHA for 6adffb6
Parsers/CsvSheetRecordParser.php
@@ -31,9 +31,12 @@ public function __construct(
31
$sheetFile, array $sheetRecordDefinition, $delimiter
32
) {
33
parent::__construct($sheetFile, $sheetRecordDefinition, $delimiter);
34
- $file = file($this->_sheetFile);
35
- foreach ($file as $index => $line) {
36
- $this->_sheet[$index] = explode($this->_delimiter, $line);
+ if (($handle = fopen($sheetFile, "r")) !== FALSE) {
+ $index = 0;
+ while (($data = fgetcsv($handle, 0, $delimiter)) !== FALSE) {
37
+ $this->_sheet[$index] = $data;
38
+ $index++;
39
+ }
40
}
41
$this->rewind();
42
0 commit comments