Skip to content
Snippets Groups Projects
Commit 95df11c6 authored by bgm's avatar bgm Committed by bgm
Browse files

Fix setWrapText to avoid fatal in obscure circumstances

Only reported by one user, but the setWrapText was throwing an exception
because the col/row range was equal to zero. Normally this works fine,
but the phpSpreadsheet code explicitly has validation against this.
parent f281fd6a
No related branches found
No related tags found
No related merge requests found
......@@ -250,8 +250,8 @@ class CRM_CiviExportExcel_Utils_Report extends CRM_Core_Page {
if ($w > 75) {
$w = 75;
// Ex: A0:A100
$area = $val . '0:' . $val . $line;
// Ex: A1:A100 (in some obscure circumstances, this can fatal if the row/col is not greater than zero)
$area = $val . '1:' . $val . $line;
$objPHPExcel->getActiveSheet()->getStyle($area)
->getAlignment()->setWrapText(true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment