Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

array_change_key_case() should not mention return null on ZPP violation #2749

Closed
Sunthief opened this issue Sep 7, 2023 · 2 comments · Fixed by #2849
Closed

array_change_key_case() should not mention return null on ZPP violation #2749

Sunthief opened this issue Sep 7, 2023 · 2 comments · Fixed by #2849
Labels

Comments

@Sunthief
Copy link

Sunthief commented Sep 7, 2023

From manual page: https://php.net/function.array-change-key-case

There seems to be an error in the function definition, more specifically the return value. This:
array_change_key_case(array $array, int $case = CASE_LOWER): array
needs to be altered to this:
array_change_key_case(array $array, int $case = CASE_LOWER): ?array
Null is returned if no array is passed.

@Girgias
Copy link
Member

Girgias commented Sep 8, 2023

That's an issue with the return value section. As this is a ZPP violation, and as of PHP 8 always throws a TypeError

@Girgias Girgias changed the title Return Value of array_change_key_case() array_change_key_case() should not mention return null on ZPP violation Sep 8, 2023
@dreeh
Copy link
Contributor

dreeh commented Oct 9, 2023

#2849

dreeh pushed a commit to dreeh/doc-en that referenced this issue Oct 10, 2023
@Girgias Girgias linked a pull request Oct 10, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants