From 258b9a65c888a0f8cca29a60a6f6a0b0d6875416 Mon Sep 17 00:00:00 2001 From: Matze2010 Date: Mon, 2 Mar 2020 06:10:14 +0000 Subject: [PATCH] fix --- src/PhpWord/Shared/Html.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PhpWord/Shared/Html.php b/src/PhpWord/Shared/Html.php index f917951b..bd564a40 100644 --- a/src/PhpWord/Shared/Html.php +++ b/src/PhpWord/Shared/Html.php @@ -244,8 +244,11 @@ class Html protected static function parseInput($node, $element, &$styles) { $attributes = $node->attributes; - $inputType = $attributes->getNamedItem('type')->value; + if (null === $attributes->getNamedItem('type')) { + return; + } + $inputType = $attributes->getNamedItem('type')->value; switch ($inputType) { case 'checkbox': $checked = ($checked = $attributes->getNamedItem('checked')) && $checked->value === "true" ?? false;