I had no problem with ckfinder in php version 7, but after updating the server to php 8.2, when I upload a photo through quick upload
, I get the following error.
CKSourceCKFinderFilesystemFileUploadedFile::__construct(): Argument #1 ($uploadedFile) must be of type SymfonyComponentHttpFoundationFileUploadedFile, array given
Do you have a solution for it?
I manually added the following commands in the FileUpload.php
file:
use SymfonyComponentHttpFoundationFileUploadedFile as UploadedFileBase;
$path = $upload['tmp_name'];
//$pathinfo = pathinfo($path);
$pathinfo = pathinfo($upload['full_path']);
$basename = $pathinfo['basename'];
$upload_File = new UploadedFileBase(
$path,
$basename,
$upload['type'],
$upload['error']
);
$uploadedFile = new UploadedFile($upload_File, $this->app);
The error was changed, but the problem was not resolved.