Commit b10d2176 authored by Sylvain's avatar Sylvain

Options param required

parent 6c6ea2ab
...@@ -461,6 +461,10 @@ class Field2Bt3 ...@@ -461,6 +461,10 @@ class Field2Bt3
{ {
$render = ''; $render = '';
if (is_null($this->options)) {
throw new \InvalidArgumentException("The `options` key is required in arguments field");
}
if (!array_key_exists('source', $this->options)) { if (!array_key_exists('source', $this->options)) {
throw new \InvalidArgumentException("The `source` key is required in options"); throw new \InvalidArgumentException("The `source` key is required in options");
} }
......
...@@ -461,6 +461,10 @@ class Field2Bt4 ...@@ -461,6 +461,10 @@ class Field2Bt4
{ {
$render = ''; $render = '';
if (is_null($this->options)) {
throw new \InvalidArgumentException("The `options` key is required in arguments field");
}
if (!array_key_exists('source', $this->options)) { if (!array_key_exists('source', $this->options)) {
throw new \InvalidArgumentException("The `source` key is required in options"); throw new \InvalidArgumentException("The `source` key is required in options");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment