Skip to content

Commit 8033a6e

Browse files
authored
Fixed null deprecation in Varien/Convert/Parser/Xml/Excel (OpenMage#4375)
1 parent a156f8f commit 8033a6e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/Varien/Convert/Parser/Xml/Excel.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,19 @@ public function parse()
3636
$dom->loadXML($this->getData());
3737

3838
$worksheets = $dom->getElementsByTagName('Worksheet');
39-
39+
/** @var DOMElement $worksheet */
4040
foreach ($worksheets as $worksheet) {
4141
$wsName = $worksheet->getAttribute('ss:Name');
4242
$rows = $worksheet->getElementsByTagName('Row');
4343
$firstRow = true;
4444
$fieldNames = [];
4545
$wsData = [];
46+
/** @var DOMElement $row */
4647
foreach ($rows as $row) {
4748
$index = 1;
4849
$cells = $row->getElementsByTagName('Cell');
4950
$rowData = [];
51+
/** @var DOMElement $cell */
5052
foreach ($cells as $cell) {
5153
$value = $cell->getElementsByTagName('Data')->item(0)->nodeValue;
5254
$ind = $cell->getAttribute('ss:Index');
@@ -195,7 +197,7 @@ public function getRowXml(array $row)
195197
$xmlData = [];
196198
$xmlData[] = '<Row>';
197199
foreach ($row as $value) {
198-
$this->_xmlElement->row = htmlspecialchars($value);
200+
$this->_xmlElement->row = htmlspecialchars((string) $value);
199201
$value = str_replace($xmlHeader, '', $this->_xmlElement->asXML());
200202
$value = preg_replace($xmlRegexp, '\\1', $value);
201203
$dataType = 'String';

0 commit comments

Comments
 (0)