From 660c62a82a041c3f203c9e395e2bc62e7788940f Mon Sep 17 00:00:00 2001 From: Magento EngCom Team Date: Wed, 24 Jan 2018 12:08:46 -0600 Subject: [PATCH] :arrow_double_up: Forwardport of magento/magento2#12304 to 2.3-develop branch Applied pull request patch https://github.com/magento/magento2/pull/12304.patch (created by @FreekVandeursen) based on commit(s): 1. 470c257f7a02e23956a9a82245f02d4d0f22fa20 2. 3d1d02741240a6894537b955721f8e0073162e3b 3. 723452c71eb6da31f6ac8f221f4c587ce855a309 --- .../Magento/Framework/App/Language/_files/bar/en_gb/1.csv | 3 ++- lib/internal/Magento/Framework/App/Language/Dictionary.php | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/Language/_files/bar/en_gb/1.csv b/dev/tests/integration/testsuite/Magento/Framework/App/Language/_files/bar/en_gb/1.csv index 0c13b51b55287..235d18468b739 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/Language/_files/bar/en_gb/1.csv +++ b/dev/tests/integration/testsuite/Magento/Framework/App/Language/_files/bar/en_gb/1.csv @@ -1,2 +1,3 @@ four and 75/100,4.75 -four and 5/10,4.50 \ No newline at end of file +four and 5/10,4.50 + diff --git a/lib/internal/Magento/Framework/App/Language/Dictionary.php b/lib/internal/Magento/Framework/App/Language/Dictionary.php index a8dc20d9465a3..02ee6ca2c9579 100644 --- a/lib/internal/Magento/Framework/App/Language/Dictionary.php +++ b/lib/internal/Magento/Framework/App/Language/Dictionary.php @@ -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]; + } } } }