-
-
Notifications
You must be signed in to change notification settings - Fork 254
Open
Description
I'm migrating from php 7.4 to 8.1 and I got this error:
Unknown named parameter on \Valitron\Validator.php on line 1522
This is my code:
$input=["name"=>"test","myothervar"=>"test"];
$labels=["name"=>"Name"];
$rules=["required"=>["name"]];
$v = new Validator($input);
$v->labels($labels]);
$v->rules($rules);
I solved changing from \Valitron\Validator.php on line 1522
call_user_func_array(array($this, 'rule'), $innerParams);
to
call_user_func_array(array($this, 'rule'), array_values($innerParams));
I guess the issue depends on call_user_func_array changeloge note for php v.8.0 (https://www.php.net/manual/en/function.call-user-func-array.php)
Metadata
Metadata
Assignees
Labels
No labels