Questtype ?textinput?: initialize list of fields if none has been entered
This commit is contained in:
parent
94d1821f79
commit
a328e71613
1 changed files with 3 additions and 3 deletions
|
@ -233,10 +233,10 @@
|
|||
throw new \nre\exceptions\ParamsNotValidException('text');
|
||||
}
|
||||
$text = $this->request->getPostParam('text');
|
||||
if(is_null($this->request->getPostParam('fields'))) {
|
||||
throw new \nre\exceptions\ParamsNotValidException('fields');
|
||||
}
|
||||
$fields = $this->request->getPostParam('fields');
|
||||
if(is_null($fields) && !is_array($fields)) {
|
||||
$fields = array();
|
||||
}
|
||||
$fields = array_values($fields);
|
||||
$fieldIndex = 0;
|
||||
foreach($fields as &$field)
|
||||
|
|
Loading…
Add table
Reference in a new issue