Project

General

Profile

Actions

Bug #70468

closed

PropertyMapper cant't create object of type TYPO3\\CMS\\Core\\Resource\\Folder

Added by Markus Hofmann over 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-10-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

In case of using frontend upload in an extbase, I use the storage for saving the uploaded files.
While trying to create the needed folder for using $storage->addFile() the properyMapper throws exeption

#1297759968: Exception while property mapping at property path "":Property "identifier" had no setter or constructor argument in target object of type "TYPO3\CMS\Core\Resource\Folder" 

Following code does this error:

$folderType = array(
     'storage' => $storage,
    'identifier' => $mountpoint->getPath(),
    'name' => $mountpoint->getTitle()
);
/** @var \TYPO3\CMS\Core\Resource\Folder $folder */
$folder = $this->propertyMapper->convert($folderType,'TYPO3\\CMS\\Core\\Resource\\Folder');

Creating the object with "new" and assigning the parameters to the constructor does the thing correct and uploads the files to the specified folder.
My current Typo3 is 7.5

Actions

Also available in: Atom PDF