Skip to content

Commit dcda524

Browse files
committed
Merge pull request #363 from magento-mpi/develop
[MPI] Bug Fixes
2 parents 2f8e0ce + 5f4b4c1 commit dcda524

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

lib/internal/Magento/Framework/Filesystem/Driver/File.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -645,10 +645,16 @@ public function fileWrite($resource, $data)
645645
public function filePutCsv($resource, array $data, $delimiter = ',', $enclosure = '"')
646646
{
647647
/**
648-
* Security enhancement for CSV data processing by Excel-like applications.
649-
* @see https://bugzilla.mozilla.org/show_bug.cgi?id=1054702
650-
*/
648+
* Security enhancement for CSV data processing by Excel-like applications.
649+
* @see https://bugzilla.mozilla.org/show_bug.cgi?id=1054702
650+
*
651+
* @var $value string|\Magento\Framework\Phrase
652+
*/
651653
foreach ($data as $key => $value) {
654+
655+
if (!is_string($value)) {
656+
$value = (string)$value;
657+
}
652658
if (isset($value[0]) && $value[0] === '=') {
653659
$data[$key] = ' ' . $value;
654660
}

lib/internal/Magento/Framework/Filesystem/Io/File.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,13 @@ public function streamWriteCsv(array $row, $delimiter = ',', $enclosure = '"')
180180
/**
181181
* Security enhancement for CSV data processing by Excel-like applications.
182182
* @see https://bugzilla.mozilla.org/show_bug.cgi?id=1054702
183+
*
184+
* @var $value string|\Magento\Framework\Phrase
183185
*/
184186
foreach ($row as $key => $value) {
187+
if (!is_string($value)) {
188+
$value = (string)$value;
189+
}
185190
if (isset($value[0]) && $value[0] === '=') {
186191
$row[$key] = ' ' . $value;
187192
}

setup/src/Magento/Setup/Fixtures/ConfigsApplyFixture.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ public function execute()
2828
$this->fixtureModel->resetObjectManager();
2929

3030
foreach ($configs['config'] as $config) {
31+
$backendModel = isset($config['backend_model'])
32+
?
33+
$config['backend_model'] : 'Magento\Framework\App\Config\Value';
3134
/**
32-
* @var \Magento\Framework\App\Config\Value $configData
35+
* @var \Magento\Framework\App\Config\ValueInterface $configData
3336
*/
34-
$configData = $this->fixtureModel->getObjectManager()->create('Magento\Framework\App\Config\Value');
37+
$configData = $this->fixtureModel->getObjectManager()->create($backendModel);
3538
$configData->setPath($config['path'])
3639
->setScope($config['scope'])
3740
->setScopeId($config['scopeId'])

0 commit comments

Comments
 (0)