Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
23 | 1 | public function updateCMSFields(FieldList $fields) |
|
24 | { |
||
25 | 1 | $image = ImageUploadField::create('Image') |
|
26 | 1 | ->setFolderName('Uploads/Blocks/Content'); |
|
27 | 1 | $fields->insertBefore($image, 'Content'); |
|
|
|||
28 | |||
29 | 1 | $fields->addFieldToTab( |
|
30 | 1 | 'Root.Main', |
|
31 | 1 | LinkField::create('BlockLinkID', 'Link'), |
|
32 | 'Image' |
||
33 | 1 | ); |
|
34 | |||
35 | 1 | $fields->insertAfter(TextField::create('SubTitle'), 'Title'); |
|
36 | 1 | } |
|
37 | |||
38 | } |
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: