Fix "Undefined offset" if border style is "none" (#1423)

This commit is contained in:
F0Rt04ka 2020-05-23 17:51:48 +07:00 committed by GitHub
parent 7b1957f996
commit 0945e87b6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -933,7 +933,12 @@ class Html extends BaseReader
*/ */
private function setBorderStyle(Style $cellStyle, $styleValue, $type): void private function setBorderStyle(Style $cellStyle, $styleValue, $type): void
{ {
if (trim($styleValue) === Border::BORDER_NONE) {
$borderStyle = Border::BORDER_NONE;
$color = null;
} else {
[, $borderStyle, $color] = explode(' ', $styleValue); [, $borderStyle, $color] = explode(' ', $styleValue);
}
$cellStyle->applyFromArray([ $cellStyle->applyFromArray([
'borders' => [ 'borders' => [