mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-26 15:26:03 +03:00
Fatal Error on non object in Worksheet.php
the disconnectCells method is not always fully initialized with the attribute _cellCollection, so a check needs to be done. Otherwise a fatal error occurs. happens if multiple xsl are created from csv file
This commit is contained in:
parent
3ea55ce287
commit
6ae1a501c5
@ -378,9 +378,10 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
|
|||||||
*/
|
*/
|
||||||
public function disconnectCells()
|
public function disconnectCells()
|
||||||
{
|
{
|
||||||
$this->_cellCollection->unsetWorksheetCells();
|
if ( $this->_cellCollection != null ){
|
||||||
$this->_cellCollection = NULL;
|
$this->_cellCollection->unsetWorksheetCells();
|
||||||
|
$this->_cellCollection = NULL;
|
||||||
|
}
|
||||||
// detach ourself from the workbook, so that it can then delete this worksheet successfully
|
// detach ourself from the workbook, so that it can then delete this worksheet successfully
|
||||||
$this->_parent = null;
|
$this->_parent = null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user