You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
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:
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)
The text was updated successfully, but these errors were encountered: