* Fix Illegal string offset for PHP 7.1
This commit is contained in:
parent
e6c978bd14
commit
5f5dba3ff7
1 changed files with 3 additions and 0 deletions
|
@ -187,6 +187,9 @@ class Validator
|
|||
$rules[$vs[0]] = isset($vs[1]) ? $vs[1] : '';
|
||||
}
|
||||
if (isset($suffix)) {
|
||||
if (isset($this->rules[$field]['array']) && ! \is_array($this->rules[$field]['array'])) {
|
||||
$this->rules[$field]['array'] = [];
|
||||
}
|
||||
$this->rules[$field]['array'][$suffix] = $rules;
|
||||
} else {
|
||||
$this->rules[$field] = $rules;
|
||||
|
|
Loading…
Add table
Reference in a new issue