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

[8.x] Handle directive $value as a string #36260

Merged
merged 1 commit into from
Feb 15, 2021

Conversation

kylekatarnls
Copy link
Contributor

@kylekatarnls kylekatarnls commented Feb 14, 2021

  • As per PHPDoc Str::startsWith and Str::endsWith are not supposed to handle null values
  • strncmp() will no longer accept null in PHP 8.1
  • It needs a string in the end (trim) so it would be relevant to cast it first.

- As per PHPDoc `Str::startsWith` and `Str::endsWith` are not supposed to handle `null` values
- strncmp() will no longer accept `null` in PHP 8.1
- It needs a `string` in the end (`trim`) so it would be relevant to cast it first.
@GrahamCampbell
Copy link
Member

I think someone else already (incorrectly, IMO) PRed a different fix to the startsWith method. Either the phpdoc of that method should be updated to allow null, or that other PR should be reverted.

@GrahamCampbell
Copy link
Member

Oh, I'm thinking of #36254. That PR still has the incorrect phpdoc.

@kylekatarnls
Copy link
Contributor Author

kylekatarnls commented Feb 14, 2021

Oh, I'm thinking of #36254. That PR still has the incorrect phpdoc.

I updated the PHPDoc (in an other function), but it sounds @taylorotwell reverted this commit: 016501d

So I guess there might be some reason to keep the string in those kind of functions.

@taylorotwell taylorotwell merged commit eee817a into laravel:8.x Feb 15, 2021
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.

3 participants