1 | <?php |
||
27 | class ImageUpload extends Module\Metadata |
||
28 | { |
||
29 | /** |
||
30 | * array of the module |
||
31 | * |
||
32 | * @var array |
||
33 | */ |
||
34 | |||
35 | protected static $_moduleArray = |
||
36 | [ |
||
37 | 'name' => 'Image Upload', |
||
38 | 'alias' => 'ImageUpload', |
||
39 | 'author' => 'Redaxmedia', |
||
40 | 'description' => 'Shared module to upload images', |
||
41 | 'version' => '4.3.0', |
||
42 | 'access' => '[1]' |
||
43 | ]; |
||
44 | |||
45 | /** |
||
46 | * array of the option |
||
47 | * |
||
48 | * @var array |
||
49 | */ |
||
50 | |||
51 | protected $_optionArray = |
||
52 | [ |
||
53 | 'uploadDirectory' => 'upload', |
||
54 | 'extension' => |
||
55 | [ |
||
56 | 'gif', |
||
57 | 'jpg', |
||
58 | 'png', |
||
59 | 'svg' |
||
60 | ] |
||
61 | ]; |
||
62 | |||
63 | /** |
||
64 | * renderStart |
||
65 | * |
||
66 | * @since 4.3.0 |
||
67 | */ |
||
68 | |||
69 | public function renderStart() : void |
||
77 | |||
78 | /** |
||
79 | * adminNotification |
||
80 | * |
||
81 | * @since 4.3.0 |
||
82 | * |
||
83 | * @return array |
||
84 | */ |
||
85 | |||
86 | public function adminNotification() : array |
||
98 | |||
99 | /** |
||
100 | * upload |
||
101 | * |
||
102 | * @since 4.3.0 |
||
103 | * |
||
104 | * @return string|null |
||
105 | */ |
||
106 | |||
107 | protected function _upload() : ?string |
||
128 | } |
||
129 |
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: