Skip to content

Commit

Permalink
Handle empty or incorrect lines in a language CSV
Browse files Browse the repository at this point in the history
  • Loading branch information
Freek Vandeursen committed Nov 16, 2017
1 parent 6f4ab5f commit 470c257
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/internal/Magento/Framework/App/Language/Dictionary.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ private function readPackCsv($vendor, $package)
foreach ($foundCsvFiles as $foundCsvFile) {
$file = $directoryRead->openFile($foundCsvFile);
while (($row = $file->readCsv()) !== false) {
$result[$row[0]] = $row[1];
if (is_array($row) && count($row) > 1) {
$result[$row[0]] = $row[1];
}
}
}
}
Expand Down

0 comments on commit 470c257

Please sign in to comment.