diff --git a/app/Service/Informe/Informe.php b/app/Service/Informe/Informe.php index ea9ecca..96af23c 100644 --- a/app/Service/Informe/Informe.php +++ b/app/Service/Informe/Informe.php @@ -16,11 +16,17 @@ class Informe { $maxCols = 0; foreach ($data as $row) { + if (!is_array($row)) { + continue; + } if (count($row) > $maxCols) { $maxCols = count($row); } } foreach ($data as &$row) { + if (!is_array($row)) { + $row = [$row]; + } if (count($row) < $maxCols) { $row = array_merge($row, array_fill(0, $maxCols - count($row), '')); }