codeigniter4 / shield

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

Bug: VENDORPATH/codeigniter4/shield/src/Models/CheckQueryReturnTrait.php at line 44 #1096

Closed rjwmtgevolution closed 3 months ago

rjwmtgevolution commented 3 months ago

PHP Version

8.2

CodeIgniter4 Version

4.5.0

Shield Version

1.0

Which operating systems have you tested for this bug?

Linux

Which server did you use?

apache

Database

postgresql

Did you customize Shield?

no

What happened?

composer update to 4.5.0. I went to login and got the following error

I believe this is going to Call to a member function getErrors() on null

VENDORPATH/codeigniter4/shield/src/Models/CheckQueryReturnTrait.php at line 44

Steps to Reproduce

the project was on codeigniter 4.4.7 and then I composer updated to 4.5.0 this morning

Expected Output

be able to login

Anything else?

No response

datamweb commented 3 months ago

This bug has already been fixed(see #1088). Note that Shield is not currently compatible with version 4.5. Good work done for compatibility. You should also wait for a new version of the CI framework(maybe 4.5.1) to be released.

rjwmtgevolution commented 3 months ago

thank you, I appreciate the quick response.

I updated the shield code and that fixed that issue.

I am getting another error now, after logging in. I click on the back button and I end up logged in.

pg_escape_literal(): Argument #2 ($string) must be of type string, CodeIgniter\I18n\Time given

SYSTEMPATH/Database/Postgre/Connection.php at line 242

datamweb commented 3 months ago

You will need the following: https://github.com/codeigniter4/CodeIgniter4/pull/8739 https://github.com/codeigniter4/CodeIgniter4/pull/8738

1095

rjwmtgevolution commented 3 months ago

Thank you for the update.

I am not sure what to do to put the fix in place.

I clicked on the links to review but I am not sure what to do to fix the problem.

Sorry for my ignorance.

rjwmtgevolution commented 3 months ago

sorry, I see the update / fix on issue

https://github.com/codeigniter4/shield/issues/1092

rjwmtgevolution commented 3 months ago

I am able to login now.

Thank you for your help.

datamweb commented 3 months ago

I clicked on the links to review but I am not sure what to do to fix the problem.

Select tab "Files changed". Then you will see all the files that have changed. You should apply these changes in each of your project files.

Screenshot 2024-04-09 225049

I am able to login now.

Do not forget that this is not a fundamental solution. Use the new version as soon as it is released.

rjwmtgevolution commented 3 months ago

perfect, thank you