valitron
valitron copied to clipboard
PHP 8.1 Support
In php 8.1 php functions will crash passing null instead of an string.
For example:
$rules = [
'required' => [
'source',
],
'url' => [
'source',
],
];
strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /vendor/vlucas/valitron/src/Valitron/Validator.php line 655
Acceted
- strpos
- *trim
- I guess all other that require typed string value
Workaround
error_reporting(E_ALL & ~E_DEPRECATED);
@galdp I'll fix this