Skip to content

Commit 5239a50

Browse files
committed
Add support for PHP 8.1.
1 parent f455740 commit 5239a50

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@
1515
}
1616
],
1717
"require": {
18-
"php": "7.0.*|7.1.*|7.2.*|7.3.*|7.4.*|8.0.*",
18+
"php": "7.0.*|7.1.*|7.2.*|7.3.*|7.4.*|8.0.*|8.1.*",
1919
"ivopetkov/html5-dom-document-php": "2.*"
2020
},
2121
"require-dev": {
22-
"phpunit/phpunit": "6.*|7.*|8.*|9.*",
2322
"ivopetkov/docs-generator": "0.1.*"
2423
},
2524
"autoload": {

src/HTMLServerComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public function __toString(): string
172172
{
173173
$html = '<' . $this->tagName;
174174
foreach ($this->attributes as $name => $value) {
175-
$html .= ' ' . $name . '="' . htmlspecialchars($value) . '"';
175+
$html .= ' ' . $name . '="' . htmlspecialchars((string)$value) . '"';
176176
}
177177
return $html . '>' . $this->innerHTML . '</' . $this->tagName . '>';
178178
}

0 commit comments

Comments
 (0)