Skip to content

Commit b36fdf0

Browse files
committed
Merge branch 'master' of https://github.com/hexydec/htmldoc
2 parents 86c3b46 + 1062091 commit b36fdf0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/htmldoc.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ public function open(string $url, $context = null, string &$error = null) {
191191
$meta = \stream_get_meta_data($handle);
192192
if (!empty($meta['wrapper_data'])) {
193193
foreach ($meta['wrapper_data'] AS $item) {
194-
if (\mb_stripos($item, 'Content-Type:') === 0 && ($charset = \mb_stristr($item, 'charset=')) !== false) {
195-
$charset = \mb_substr($charset, 8);
194+
if (\mb_stripos($item, 'Content-Type:') === 0 && ($value = \mb_stristr($item, 'charset=')) !== false) {
195+
$charset = \mb_substr($value, 8);
196196
break;
197197
}
198198
}

src/tokens/tag.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ public function html(array $options = []) : string {
653653

654654
// double quotes
655655
} else {
656-
$html .= '="'.\str_replace(['&', '"', '<'], ['&amp;', '&quot;', '&lt;'], $value).'"';
656+
$html .= '="'.\str_replace(['&', '"', '<'], ['&amp;', '&quot;', '&lt;'], \strval($value)).'"';
657657
}
658658
}
659659
}

0 commit comments

Comments
 (0)