Skip to content

The grapheme_strlen function returns null on encoding failures#5568

Merged
jordikroon merged 2 commits into
php:masterfrom
chschneider:grapheme_strlen_returns_null_too
May 20, 2026
Merged

The grapheme_strlen function returns null on encoding failures#5568
jordikroon merged 2 commits into
php:masterfrom
chschneider:grapheme_strlen_returns_null_too

Conversation

@chschneider
Copy link
Copy Markdown
Contributor

@chschneider chschneider commented May 18, 2026

The documentation only mentions false for grapheme_strlen failures but in reality it also returns null for encoding failures (which is the more common failure case).
Mention this additional return value in the corresponding section.

Fixes #5554

Comment thread reference/intl/grapheme/grapheme-strlen.xml Outdated
Comment thread reference/intl/grapheme/grapheme-strlen.xml Outdated
Comment thread reference/intl/grapheme/grapheme-strlen.xml Outdated
@jordikroon
Copy link
Copy Markdown
Member

LGTM. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

grapheme_strlen(): Return Values section does not mention null

3 participants