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

[9.x] Update Encrypter.php #42370

Merged
merged 2 commits into from
May 12, 2022
Merged

[9.x] Update Encrypter.php #42370

merged 2 commits into from
May 12, 2022

Conversation

diadal
Copy link
Contributor

@diadal diadal commented May 12, 2022

enforce decrypt payload to string, fix for below error

base64_decode(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php on line 208

diadal and others added 2 commits May 12, 2022 11:43
enforce decrypt payload to string, fix for below error

`base64_decode(): Passing null to parameter laravel#1 ($string) of type string is deprecated in vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php on line 208`
@taylorotwell taylorotwell merged commit eb5d3dd into laravel:9.x May 12, 2022
@GrahamCampbell
Copy link
Member

Not passing a string is not a valid way to call this function. One should expect it to crash if you pass null.

taylorotwell added a commit that referenced this pull request May 12, 2022
taylorotwell added a commit that referenced this pull request May 12, 2022
@diadal
Copy link
Contributor Author

diadal commented May 26, 2022

Not passing a string is not a valid way to call this function. One should expect it to crash if you pass null.

null value never crashes only keep logging PHP 8.1 I will advise conversion of null to ''

Screen Shot 2022-05-26 at 6 42 03 AM

diadal added a commit to diadal/framework that referenced this pull request May 26, 2022
@diadal
Copy link
Contributor Author

diadal commented May 26, 2022

Not passing a string is not a valid way to call this function. One should expect it to crash if you pass null.

you can check with PHP 8.0 with no logging but PHP 8.1 keep logging without crashes and is not a bad idea to convert null to '' in Encrypter.php

@GrahamCampbell GrahamCampbell changed the title Update Encrypter.php [9.x] Update Encrypter.php Jun 17, 2022
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