Closed
Description
PHP Version
8.1
CodeIgniter4 Version
4.2.5
CodeIgniter4 Installation Method
Composer (using codeigniter4/appstarter
)
Which operating systems have you tested for this bug?
macOS
Which server did you use?
apache
Database
No response
What happened?
trim() on null is not working for validation.
I suggest to edit: Validation.php Line 302:
$passed = $param === false ? $rule((string) $value ?? '') : $rule((string) $value ?? '', $param, $data);
Steps to Reproduce
make rule without a post.
Expected Output
Expected:\
Previous:
$passed = $param === false ? $rule($value) : $rule($value, $param, $data);
$passed = $param === false ? $rule((string) $value ?? '') : $rule((string) $value ?? '', $param, $data);
Anything else?
No response
Activity