| 1 | <?php |
||
| 21 | class UserSetting extends User |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @param Guard $model |
||
| 25 | */ |
||
| 26 | 4 | public function __construct(Guard $model) |
|
| 30 | |||
| 31 | /** |
||
| 32 | * @return array |
||
| 33 | */ |
||
| 34 | 4 | public function actions() |
|
| 40 | |||
| 41 | /** |
||
| 42 | * @return array |
||
| 43 | */ |
||
| 44 | 4 | protected function innerFields() |
|
| 45 | { |
||
| 46 | $fields = [ |
||
| 47 | 'language' => [ |
||
| 48 | 4 | 'type' => 'select', |
|
| 49 | 4 | 'label' => 'language', |
|
| 50 | 4 | 'options' => $this->getModel()->getLanguages(), |
|
| 51 | 4 | 'value' => app('tinyissue.settings')->getLanguage(), |
|
| 52 | ], |
||
| 53 | ]; |
||
| 54 | 4 | $fields += $this->passwordFields(); |
|
| 55 | |||
| 56 | 4 | return $fields; |
|
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @return array |
||
| 61 | */ |
||
| 62 | 4 | public function rules() |
|
| 70 | } |
||
| 71 |
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: