codeigniter4 / shield

Authentication and Authorization for CodeIgniter 4
https://shield.codeigniter.com
MIT License
366 stars 133 forks source link

Bug: magic link - preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated #575

Closed tbobker123 closed 1 year ago

tbobker123 commented 1 year ago

PHP Version

8.2

CodeIgniter4 Version

4.2.8

Shield Version

running composer update and getting latest version does not solve the issue.

Which operating systems have you tested for this bug?

macOS

Which server did you use?

cli-server (PHP built-in webserver)

Database

5.7.34

Did you customize Shield?

Nothing has been customised.

What happened?

I tried to get a magic login link because I forgot the password and when I clicked the send button, an error exception page loads with the error:

preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated

Steps to Reproduce

Click to get a magic link, enter your email address and click send.

Expected Output

No error and a magic link to be sent to my email address.

Anything else?

I suppose its linked to me using the latest PHP version 8.2, but I do not want to modify the core Shield files so if there is anyway to override the logic somewhere else.

kenjis commented 1 year ago

Duplicate of #289

datamweb commented 1 year ago

Hi, welcome. Please read the description of the second (2) paragraph .(https://github.com/codeigniter4/shield/blob/develop/docs/install.md#command-setup)