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

Fixes return types for various Utils methods #8165

Merged

Conversation

Sesquipedalian
Copy link
Member

In particular, methods that internally use preg functions could return false.

In particular, methods that internally use preg functions could return false.

Signed-off-by: Jon Stovell <[email protected]>
@Sesquipedalian Sesquipedalian added this to the 3.0 Alpha 2 milestone Apr 1, 2024
@Sesquipedalian Sesquipedalian merged commit 631b98c into SimpleMachines:release-3.0 Apr 1, 2024
6 checks passed
@Sesquipedalian Sesquipedalian deleted the utils_return_types branch April 1, 2024 21:24
@jdarwood007
Copy link
Member

jdarwood007 commented Apr 1, 2024

FYI, the Return type of false is PHP 8.2+. Which is why it wasn't used.
https://www.php.net/manual/en/language.types.declarations.php

@Sesquipedalian
Copy link
Member Author

Actually, false and null can be used as return types in 8.0 if they are part of a union type. 8.2 added the ability for them to be standalone return types.

@jdarwood007
Copy link
Member

Ahh, good to know.

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.

2 participants