Skip to content

[pull] master from php:master#1116

Merged
pull[bot] merged 3 commits into
turkdevops:masterfrom
php:master
Jul 23, 2026
Merged

[pull] master from php:master#1116
pull[bot] merged 3 commits into
turkdevops:masterfrom
php:master

Conversation

@pull

@pull pull Bot commented Jul 23, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

eyupcanakman and others added 3 commits July 23, 2026 14:52
mb_find_strpos() converts the haystack and needle to UTF-8 and does the length and offset math on the converted strings.
The negative-offset branch computed the needle length from the raw needle instead of needle_u8.
mb_fast_strlen_utf8() reads those bytes as UTF-8, so the count is wrong whenever they do not decode one to one.
A byte in 0x80-0xBF (ISO-8859-1) undercounts, and a wider encoding such as an ASCII needle in UTF-16 overcounts, so the reverse-search window is shifted.
Use needle_u8, the converted needle the rest of the branch already searches with.
@pull pull Bot locked and limited conversation to collaborators Jul 23, 2026
@pull pull Bot added the ⤵️ pull label Jul 23, 2026
@pull
pull Bot merged commit 4983e8b into turkdevops:master Jul 23, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants