Resolve problem with incorrectly defined hyperlinks
This commit is contained in:
Max Kalyabin 2020-12-11 01:10:01 +03:00 committed by GitHub
parent 916b6888eb
commit 2c927b1ca5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ class Hyperlinks
foreach (Coordinate::extractAllCellReferencesInRange($hyperlink['ref']) as $cellReference) { foreach (Coordinate::extractAllCellReferencesInRange($hyperlink['ref']) as $cellReference) {
$cell = $worksheet->getCell($cellReference); $cell = $worksheet->getCell($cellReference);
if (isset($linkRel['id'])) { if (isset($linkRel['id'])) {
$hyperlinkUrl = $this->hyperlinks[(string) $linkRel['id']]; $hyperlinkUrl = $this->hyperlinks[(string) $linkRel['id']] ?? null;
if (isset($hyperlink['location'])) { if (isset($hyperlink['location'])) {
$hyperlinkUrl .= '#' . (string) $hyperlink['location']; $hyperlinkUrl .= '#' . (string) $hyperlink['location'];
} }