From 3fc2fa47de62dd2e2b8e6f2d23a4d3e3c9db316f Mon Sep 17 00:00:00 2001 From: Dennis Holst Date: Tue, 12 Nov 2019 14:09:10 +0100 Subject: [PATCH] Check for existing xf index in mapping array before accessing it --- src/PhpSpreadsheet/Reader/Xls.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpSpreadsheet/Reader/Xls.php b/src/PhpSpreadsheet/Reader/Xls.php index b10df595..313d7216 100644 --- a/src/PhpSpreadsheet/Reader/Xls.php +++ b/src/PhpSpreadsheet/Reader/Xls.php @@ -3825,7 +3825,7 @@ class Xls extends BaseReader } } - if (!$this->readDataOnly && !$emptyCell) { + if (!$this->readDataOnly && !$emptyCell && isset($this->mapCellXfIndex[$xfIndex])) { // add style information $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); }