Fix to inappropriate replacement of count() with empty().... there may be others I've not spotted yet.

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@85438 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker 2012-01-18 17:55:51 +00:00
parent 414209c03d
commit 9bec4af001
2 changed files with 4 additions and 4 deletions

View File

@ -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) {

View File

@ -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) {