Add the ability to pass an array with various keys to addRows()
This commit is contained in:
parent
1d3a9f939c
commit
aeafe316d0
@ -238,7 +238,8 @@ abstract class AbstractWriter implements WriterInterface
|
||||
public function addRows(array $dataRows)
|
||||
{
|
||||
if (!empty($dataRows)) {
|
||||
if (!is_array($dataRows[0])) {
|
||||
$firstRow = reset($dataRows);
|
||||
if (!is_array($firstRow)) {
|
||||
throw new InvalidArgumentException('The input should be an array of arrays');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user