Skip to content
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

Unreasonable default parameter #482

Closed
JuveLee opened this issue May 4, 2017 · 0 comments
Closed

Unreasonable default parameter #482

JuveLee opened this issue May 4, 2017 · 0 comments

Comments

@JuveLee
Copy link

JuveLee commented May 4, 2017

The parameter 'messages' for function CodeIgniter\Controller->validate has a unreasonable default value 'null'.
Beacuse that function call a function CodeIgniter\Validation\Validation->setRules, and the second parameter of that function has a default value 'empty array'.
So when I use validate function like this:
$this->validate($this->request, ['title' => 'required', 'text' => 'required'])
There will be an error "Argument 2 passed to CodeIgniter\Validation\Validation::setRules() must be of the type array, null given".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant