Fix fatal error when `RichText` extract container cell's font
`RichText` tries to extract container cell's font via `Cell->getParent()->getStyle(...)`, which crashes because `getParent()` does not return a worksheet. Changing it to `getWorksheet()` fixes the problem.
This commit is contained in:
parent
720fb3eff5
commit
2484a03f19
|
@ -48,7 +48,7 @@ class RichText implements IComparable
|
|||
// Add cell text and style
|
||||
if ($pCell->getValue() != '') {
|
||||
$objRun = new RichText\Run($pCell->getValue());
|
||||
$objRun->setFont(clone $pCell->getParent()->getStyle($pCell->getCoordinate())->getFont());
|
||||
$objRun->setFont(clone $pCell->getWorksheet()->getStyle($pCell->getCoordinate())->getFont());
|
||||
$this->addText($objRun);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue