Skip to content

Commit 16e8d23

Browse files
committed
Amends
1 parent f2c3399 commit 16e8d23

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

ext/dom/html_document.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ PHP_METHOD(DOM_HTMLDocument, createEmpty)
512512
const lxb_encoding_data_t *encoding_data = lxb_encoding_data_by_name((const lxb_char_t *) encoding, encoding_len);
513513

514514
if (encoding_data == NULL) {
515-
zend_argument_value_error(1, "is not a valid document encoding");
515+
zend_argument_value_error(1, "must be a valid document encoding");
516516
RETURN_THROWS();
517517
}
518518

ext/dom/tests/modern/html/encoding/HTMLDocument_encoding_field_test.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ string(6) "EUC-KR"
4040
string(12) "windows-1251"
4141
Invalid document encoding
4242
string(12) "windows-1251"
43-
DOM\HTMLDocument::createEmpty(): Argument #1 ($encoding) is not a valid document encoding
43+
DOM\HTMLDocument::createEmpty(): Argument #1 ($encoding) must be a valid document encoding
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--TEST--
2+
DOM\HTMLDocument::createFromString() with LIBXML_HTML_NOIMPLIED - tree error should not happen
3+
--EXTENSIONS--
4+
dom
5+
--FILE--
6+
<?php
7+
8+
$dom = DOM\HTMLDocument::createFromString("<div>foo</div>", LIBXML_HTML_NOIMPLIED);
9+
echo $dom->saveHTML();
10+
11+
?>
12+
--EXPECT--
13+
<div>foo</div>

0 commit comments

Comments
 (0)