From 56e5a80c442b29711174d9b3f39ad97deda6b878 Mon Sep 17 00:00:00 2001 From: Alexander Borisov Date: Mon, 26 Jan 2026 19:19:45 +0100 Subject: [PATCH 1/2] Fix GH-21041: Dom\HTMLDocument corrupts closing tags within scripts --- NEWS | 4 ++++ ext/dom/lexbor/lexbor/html/tokenizer/state_script.c | 1 + 2 files changed, 5 insertions(+) diff --git a/NEWS b/NEWS index e229b4aaec3c..f863e4d3cae4 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,10 @@ PHP NEWS - Date: . Update timelib to 2022.16. (Derick) +- DOM: + . Fixed GH-21041 (Dom\HTMLDocument corrupts closing tags within scripts). + (lexborisov) + - MbString: . Fixed bug GH-20833 (mb_str_pad() divide by zero if padding string is invalid in the encoding). (ndossche) diff --git a/ext/dom/lexbor/lexbor/html/tokenizer/state_script.c b/ext/dom/lexbor/lexbor/html/tokenizer/state_script.c index 188cf08f9f6f..4d56d18f7f3f 100644 --- a/ext/dom/lexbor/lexbor/html/tokenizer/state_script.c +++ b/ext/dom/lexbor/lexbor/html/tokenizer/state_script.c @@ -364,6 +364,7 @@ lxb_html_tokenizer_state_script_data_end_tag_name(lxb_html_tokenizer_t *tkz, if (lexbor_str_res_alpha_character[*data] == LEXBOR_STR_RES_SLIP) { + lxb_html_tokenizer_state_append_data_m(tkz, data); goto anything_else; } From 74b8fdb95b13419da85470b8f7540f1bb828e4e0 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Mon, 26 Jan 2026 20:37:23 +0100 Subject: [PATCH 2/2] Fix getPartsIterator stub (#21003) --- ext/intl/breakiterator/breakiterator.stub.php | 2 +- ext/intl/breakiterator/breakiterator_arginfo.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/intl/breakiterator/breakiterator.stub.php b/ext/intl/breakiterator/breakiterator.stub.php index ee59e4a406ba..8132c12f1c84 100644 --- a/ext/intl/breakiterator/breakiterator.stub.php +++ b/ext/intl/breakiterator/breakiterator.stub.php @@ -86,7 +86,7 @@ public function getErrorMessage(): string {} public function getLocale(int $type): string|false {} /** @tentative-return-type */ - public function getPartsIterator(string $type = IntlPartsIterator::KEY_SEQUENTIAL): IntlPartsIterator {} + public function getPartsIterator(int $type = IntlPartsIterator::KEY_SEQUENTIAL): IntlPartsIterator {} /** @tentative-return-type */ public function getText(): ?string {} diff --git a/ext/intl/breakiterator/breakiterator_arginfo.h b/ext/intl/breakiterator/breakiterator_arginfo.h index d4dcf3bbca43..e9a97b5129d2 100644 --- a/ext/intl/breakiterator/breakiterator_arginfo.h +++ b/ext/intl/breakiterator/breakiterator_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit breakiterator.stub.php instead. - * Stub hash: 08122a53702dd08727cc88144419dcc4eb9299af */ + * Stub hash: 14892bbc6f25c04c109ddbbe140a4b1f575cafd6 */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_IntlBreakIterator_createCharacterInstance, 0, 0, IntlBreakIterator, 1) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null") @@ -38,7 +38,7 @@ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_IntlBreakIterato ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_IntlBreakIterator_getPartsIterator, 0, 0, IntlPartsIterator, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 0, "IntlPartsIterator::KEY_SEQUENTIAL") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "IntlPartsIterator::KEY_SEQUENTIAL") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_IntlBreakIterator_getText, 0, 0, IS_STRING, 1)