From 1a2a6816fb5bb0e146524ba40aa419695c40136a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=A1=D0=B8=D0=BC?= =?UTF-8?q?=D0=BE=D0=BD=D1=8F=D0=BD?= Date: Thu, 8 Sep 2016 11:48:53 +0300 Subject: [PATCH] Fix undefined index exceprtion in readRow() It's possible undefined index exception in $this->mapCellXfIndex. --- src/PhpSpreadsheet/Reader/Excel5.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpSpreadsheet/Reader/Excel5.php b/src/PhpSpreadsheet/Reader/Excel5.php index 5a0f4f3b..e3183dd9 100644 --- a/src/PhpSpreadsheet/Reader/Excel5.php +++ b/src/PhpSpreadsheet/Reader/Excel5.php @@ -3516,7 +3516,7 @@ class Excel5 extends BaseReader implements IReader // bit: 27-16; mask: 0x0FFF0000; only applies when hasExplicitFormat = 1; index to XF record $xfIndex = (0x0FFF0000 & self::getInt4d($recordData, 12)) >> 16; - if ($hasExplicitFormat) { + if ($hasExplicitFormat && $this->mapCellXfIndex[$xfIndex]) { $this->phpSheet->getRowDimension($r + 1)->setXfIndex($this->mapCellXfIndex[$xfIndex]); } }