Skip to content

False isn't allowed for substr()'s $length #984

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

Merged
merged 2 commits into from
Mar 30, 2022
Merged

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Sep 29, 2021

When strict types are enabled, passing false currently throws the following error:

Fatal error: Uncaught TypeError: substr(): Argument #3 ($length) must be of type ?int, bool given

See php/php-src#7533.

@kamil-tekiela
Copy link
Member

It seems this would require changelog entry.

@Crell Crell merged commit 15247c7 into php:master Mar 30, 2022
@Crell
Copy link
Contributor

Crell commented Mar 30, 2022

Thanks!

@dunglas dunglas deleted the patch-1 branch March 31, 2022 04:42
tiffany-taylor pushed a commit to tiffany-taylor/doc-en that referenced this pull request Jan 16, 2023
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.

4 participants