diff --git a/Classes/PHPExcel/Writer/Excel5.php b/Classes/PHPExcel/Writer/Excel5.php index 20b094a..1f1e650 100644 --- a/Classes/PHPExcel/Writer/Excel5.php +++ b/Classes/PHPExcel/Writer/Excel5.php @@ -223,7 +223,7 @@ class PHPExcel_Writer_Excel5 implements PHPExcel_Writer_IWriter $escher = null; // check if there are any shapes for this sheet - if (empty($sheet->getDrawingCollection())) { + if (count($sheet->getDrawingCollection()) == 0) { continue; } @@ -319,7 +319,7 @@ class PHPExcel_Writer_Excel5 implements PHPExcel_Writer_IWriter // any drawings in this workbook? $found = false; foreach ($this->_phpExcel->getAllSheets() as $sheet) { - if (!empty($sheet->getDrawingCollection())) { + if (count($sheet->getDrawingCollection()) > 0) { $found = true; break; } @@ -348,7 +348,7 @@ class PHPExcel_Writer_Excel5 implements PHPExcel_Writer_IWriter foreach ($this->_phpExcel->getAllsheets() as $sheet) { $sheetCountShapes = 0; // count number of shapes (minus group shape), in sheet - if (!empty($sheet->getDrawingCollection())) { + if (count($sheet->getDrawingCollection()) > 0) { ++$countDrawings; foreach ($sheet->getDrawingCollection() as $drawing) { diff --git a/Classes/PHPExcel/Writer/Excel5/Workbook.php b/Classes/PHPExcel/Writer/Excel5/Workbook.php index 304ed23..f8599d5 100644 --- a/Classes/PHPExcel/Writer/Excel5/Workbook.php +++ b/Classes/PHPExcel/Writer/Excel5/Workbook.php @@ -643,7 +643,7 @@ class PHPExcel_Writer_Excel5_Workbook extends PHPExcel_Writer_Excel5_BIFFwriter $chunk = ''; // Named ranges - if (!empty($this->_phpExcel->getNamedRanges())) { + if (count($this->_phpExcel->getNamedRanges()) > 0) { // Loop named ranges $namedRanges = $this->_phpExcel->getNamedRanges(); foreach ($namedRanges as $namedRange) {