Skip to content

Commit 2c927b1

Browse files
authored
fixes #1655 issue (#1656)
Resolve problem with incorrectly defined hyperlinks
1 parent 916b688 commit 2c927b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ private function setHyperlink(SimpleXMLElement $hyperlink, Worksheet $worksheet)
4141
foreach (Coordinate::extractAllCellReferencesInRange($hyperlink['ref']) as $cellReference) {
4242
$cell = $worksheet->getCell($cellReference);
4343
if (isset($linkRel['id'])) {
44-
$hyperlinkUrl = $this->hyperlinks[(string) $linkRel['id']];
44+
$hyperlinkUrl = $this->hyperlinks[(string) $linkRel['id']] ?? null;
4545
if (isset($hyperlink['location'])) {
4646
$hyperlinkUrl .= '#' . (string) $hyperlink['location'];
4747
}

0 commit comments

Comments
 (0)