Skip to content

Commit 258b9a6

Browse files
committed
fix
1 parent ad8eecc commit 258b9a6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/PhpWord/Shared/Html.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,11 @@ protected static function parseParagraph($node, $element, &$styles)
244244
protected static function parseInput($node, $element, &$styles)
245245
{
246246
$attributes = $node->attributes;
247-
$inputType = $attributes->getNamedItem('type')->value;
247+
if (null === $attributes->getNamedItem('type')) {
248+
return;
249+
}
248250

251+
$inputType = $attributes->getNamedItem('type')->value;
249252
switch ($inputType) {
250253
case 'checkbox':
251254
$checked = ($checked = $attributes->getNamedItem('checked')) && $checked->value === "true" ?? false;

0 commit comments

Comments
 (0)