-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix: TypeError in Validation is_unique/is_not_unique #7085
Conversation
TypeError : CodeIgniter\Validation\Rules::is_unique(): Argument #1 ($str) must be of type ?string, int given, called in /.../CodeIgniter4/system/Validation/StrictRules/Rules.php on line 154 /.../CodeIgniter4/system/Validation/Rules.php:126
If we use Strict Rules, the behavior may change.
I already tested it and it works. |
@@ -86,7 +86,11 @@ public function greater_than_equal_to(?string $str, string $min): bool | |||
public function is_not_unique(?string $str, string $field, array $data): bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yesterday I was trying something else, I removed "?string" and it worked.
I'm using "codeigniter 4 app starter", how to get this to update or change this branch to vendor/codeigniter4/framework or something? I tested it was to copy the files and replace. |
@jlopes90 Thank you for testing. See codeigniter4/shield#195 (comment)
|
Description
See https://forum.codeigniter.com/showthread.php?tid=86107
Rules::is_unique()
andis_not_unique()
in Strict RulesStrictRules\DatabaseRelatedRulesTest
because Strict Rules are now defaultChecklist: