From 0945e87b6da1db95cf94b0cdd92db5456657de61 Mon Sep 17 00:00:00 2001 From: F0Rt04ka Date: Sat, 23 May 2020 17:51:48 +0700 Subject: [PATCH] Fix "Undefined offset" if border style is "none" (#1423) --- src/PhpSpreadsheet/Reader/Html.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/PhpSpreadsheet/Reader/Html.php b/src/PhpSpreadsheet/Reader/Html.php index 5e12a2fb..2fe85b6f 100644 --- a/src/PhpSpreadsheet/Reader/Html.php +++ b/src/PhpSpreadsheet/Reader/Html.php @@ -933,7 +933,12 @@ class Html extends BaseReader */ private function setBorderStyle(Style $cellStyle, $styleValue, $type): void { - [, $borderStyle, $color] = explode(' ', $styleValue); + if (trim($styleValue) === Border::BORDER_NONE) { + $borderStyle = Border::BORDER_NONE; + $color = null; + } else { + [, $borderStyle, $color] = explode(' ', $styleValue); + } $cellStyle->applyFromArray([ 'borders' => [