Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function createField($fieldName, $defaultValue = null, $main = false) |
||
26 | { |
||
27 | $field = parent::createField($fieldName, $defaultValue, $main); |
||
28 | |||
29 | // If we have the main booker account, we create a |
||
30 | if ($main) { |
||
31 | $field = CompositeField::create([ |
||
32 | EmailField::create("{$fieldName}[_Email]", $this->Title, $defaultValue), |
||
33 | EmailField::create( |
||
34 | "{$fieldName}[_ConfirmedEmail]", |
||
35 | _t(__CLASS__ . '.ConfirmedEmail', 'Confirm {title}', null, ['title' => $this->Title]), |
||
|
|||
36 | $defaultValue |
||
37 | ), |
||
38 | ]); |
||
39 | $field->addExtraClass($this->ExtraClass); |
||
40 | } |
||
41 | |||
42 | return $field; |
||
43 | } |
||
44 | } |
||
45 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: