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

Bug: $hash in User::SetPasswordHash not nullable #1234

Open
ludis opened this issue Dec 6, 2024 · 0 comments
Open

Bug: $hash in User::SetPasswordHash not nullable #1234

ludis opened this issue Dec 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ludis
Copy link

ludis commented Dec 6, 2024

PHP Version

8.3.4

CodeIgniter4 Version

4.5.2

Shield Version

1.1.0

Which operating systems have you tested for this bug?

macOS

Which server did you use?

apache

Database

MySQL 5.7

Did you customize Shield?

No

What happened?

Create new user with password empty
User requests a login link
Error: CRITICAL - 2024-12-06 12:38:16 --> TypeError: CodeIgniter\Shield\Entities\User::setPasswordHash(): Argument #1 ($hash) must be of type string, null given

Steps to Reproduce

See 'what happened'

Expected Output

CodeIgniter\Shield\Entities\User::setPasswordHash() should accept NULL values I think.
Since private property $password_hash of class User is nullable.
Parameter $hash should be nullable, like this:
public function setPasswordHash(?string $hash)

Anything else?

No response

@ludis ludis added the bug Something isn't working label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant