[PHP-CVS] [php-src] master: Merge branch 'PHP-8.5'
[email protected] (Weilin Du)
| Newsgroups | php.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Weilin Du (LamentXU123)
Date: 2026-08-18T22:58:55+08:00
Commit: https://github.com/php/php-src/commit/54371b57de472938210ecd420dbefb935c5db268
Raw diff: https://github.com/php/php-src/commit/54371b57de472938210ecd420dbefb935c5db268.diff
Merge branch 'PHP-8.5'
* PHP-8.5:
Merge branch 'PHP-8.4' into PHP-8.5
Changed paths:
M NEWS
M ext/intl/grapheme/grapheme_string.cpp
Diff:
diff --git a/NEWS b/NEWS
index 26d5db72e18b..0890a7da9825 100644
--- a/NEWS
+++ b/NEWS
@@ -38,6 +38,7 @@ PHP NEWS
for UTF-8 strings). (ColumbusLabs)
. Fixed Locale::parseLocale() reading past a trailing '-' or '_'.
(iliaal, Xuyang Zhang)
+ . Fixed grapheme_str_split() treating UBRK_DONE as a byte index. (iliaal)
- Phar:
. Fixed Phar archives being automatically detected when ".phar" only occurs
diff --git a/ext/intl/grapheme/grapheme_string.cpp b/ext/intl/grapheme/grapheme_string.cpp
index a1daae84db9c..e2a6280bcaa6 100644
--- a/ext/intl/grapheme/grapheme_string.cpp
+++ b/ext/intl/grapheme/grapheme_string.cpp
@@ -908,9 +908,9 @@ U_CFUNC PHP_FUNCTION(grapheme_str_split)
add_next_index_stringl(return_value, pstr, pos - current);
end = pstr + pos - current;
i = 0;
+ pstr += pos - current;
+ current = pos;
}
- pstr += pos - current;
- current = pos;
} else {
i += 1;
}