This commit is contained in:
Michael Simpson 2016-11-03 19:39:23 -04:00
commit 70a1c82b32
2 changed files with 3 additions and 2 deletions

View File

@ -149,7 +149,8 @@ EOD;
private function isEmptyRow($dataRow)
{
$numCells = count($dataRow);
return ($numCells === 1 && CellHelper::isEmpty($dataRow[0]));
// using "reset()" instead of "$dataRow[0]" because $dataRow can be an associative array
return ($numCells === 1 && CellHelper::isEmpty(reset($dataRow)));
}
/**

View File

@ -294,7 +294,7 @@ class WriterTest extends \PHPUnit_Framework_TestCase
$dataRows = [
[''],
['xlsx--21', 'xlsx--22'],
[''],
['key' => ''],
[''],
['xlsx--51', 'xlsx--52'],
];