Skip to content

Commit

Permalink
MAGETWO-83977: Handle empty or incorrect lines in a language CSV #12304
Browse files Browse the repository at this point in the history
  • Loading branch information
ishakhsuvarov authored Nov 18, 2017
2 parents 2c3cd64 + 53ffa37 commit 56e8d72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
four and 75/100,4.75
four and 5/10,4.50
four and 5/10,4.50

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 56e8d72

Please sign in to comment.