diff --git a/src/Twig/RichEditorExtension.php b/src/Twig/RichEditorExtension.php index 4f4e923f..52a28f40 100644 --- a/src/Twig/RichEditorExtension.php +++ b/src/Twig/RichEditorExtension.php @@ -256,7 +256,7 @@ public function getCurrentFilePath(array $context): ?string $path = $form->vars['data']; if (!empty($app->getRequest()->get('rich_editor_uploaded_files'))) { $uploadedFile = $app->getRequest()->get('rich_editor_uploaded_files'); - if (null !== ($fullName = $uploadedFile->getFullName())) { + if (null !== ($fullName = $uploadedFile['full_name'] ?? null)) { return $fullName; } } diff --git a/src/Uploader/FileUploader.php b/src/Uploader/FileUploader.php index ecf47255..7d994d44 100644 --- a/src/Uploader/FileUploader.php +++ b/src/Uploader/FileUploader.php @@ -23,26 +23,10 @@ class FileUploader public const FILE_TYPE_IMAGE = 'image'; public const FILE_TYPE_VIDEO = 'video'; - /** - * @var string - */ - private $fileTargetPath; - - /** - * @var string - */ - private $imageTargetPath; + private string $fileTargetPath; + private string $imageTargetPath; + private string $publicDirectory; - /** - * @var string - */ - private $publicDirectory; - - /** - * @param string $fileTargetPath - * @param string $imageTargetPath - * @param string $publicDirectory - */ public function __construct(string $fileTargetPath, string $imageTargetPath, string $publicDirectory) { $this->fileTargetPath = $fileTargetPath;