| 1 | <?php |
||
| 3 | class DynamicContentBlockDataExtension extends DataExtension |
||
| 4 | { |
||
| 5 | /** |
||
| 6 | * @var array |
||
| 7 | */ |
||
| 8 | private static $db = array( |
||
| 9 | 'SubTitle' => 'Varchar(255)', |
||
| 10 | ); |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var array |
||
| 14 | */ |
||
| 15 | private static $has_one = array( |
||
| 16 | 'Image' => 'Image', |
||
| 17 | 'BlockLink' => 'Link', |
||
| 18 | ); |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param FieldList $fields |
||
| 22 | */ |
||
| 23 | public function updateCMSFields(FieldList $fields) |
||
| 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: