Skip to content

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
Collaborator

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

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