diff --git a/Classes/PHPExcel/ReferenceHelper.php b/Classes/PHPExcel/ReferenceHelper.php index ef990bda..6fc96ecb 100644 --- a/Classes/PHPExcel/ReferenceHelper.php +++ b/Classes/PHPExcel/ReferenceHelper.php @@ -274,7 +274,9 @@ class PHPExcel_ReferenceHelper $pSheet->setComments($aNewComments); // replace the comments array // Update worksheet: hyperlinks - $aHyperlinkCollection = array_reverse($pSheet->getHyperlinkCollection(), true); + $aHyperlinkCollection = $pNumCols > 0 || $pNumRows > 0 ? + array_reverse($pSheet->getHyperlinkCollection(), true) : + $pSheet->getHyperlinkCollection(); foreach ($aHyperlinkCollection as $key => $value) { $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); if ($key != $newReference) { diff --git a/changelog.txt b/changelog.txt index 16a7ac10..bcdccbae 100644 --- a/changelog.txt +++ b/changelog.txt @@ -57,6 +57,7 @@ Fixed in develop branch for release v1.7.9: - Bugfix: (ccorliss) Work item GH-105 - Fixed number format fatal error - Bugfix: (MBaker) - Add DROP TABLE in destructor for SQLite and SQLite3 cache controllers - Bugfix: (alexgann) Work item GH-154 - Fix merged-cell borders on HTML/PDF output +- Bugfix: (Shanto) Work item GH-161 - Fix: Hyperlinks break when removing rows --------------------------------------------------------------------------------