History log of /PHP-7.4/ext/intl/tests/bug74264.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# 28c93763 05-Jul-2021 Christoph M. Becker

Fix #74264: grapheme_strrpos() broken for negative offsets

We must not assume that `usearch_last()` gives the proper result for
negative offsets. Instead we'd need to continue to search

Fix #74264: grapheme_strrpos() broken for negative offsets

We must not assume that `usearch_last()` gives the proper result for
negative offsets. Instead we'd need to continue to search backwards
(`usearch_previous`) until we find a proper match. However, apparently
searching backwards is broken, so we work around by searching forward
from the start of the string until we pass the `offset_pos`, and then
use the previous result.

Closes GH-7189.

show more ...