Actions
Bug #76677
closedPasting HTML with image fails in RTE if no default upload folder can be found
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2016-06-17
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
If an editor pastes some HTML which contains an externally hosted image in an RTE field the HTML parser tries to download the image and store it in FAL.
\TYPO3\CMS\Core\Html\RteHtmlParser::TS_images_db()
It tries to store it in the default upload folder of the BE user and uses
$folder = $GLOBALS['BE_USER']->getDefaultUploadFolder($this->recPid, $table, $field);
to retrieve the folder object. This function may return false if no upload folder can be found.
The code fails to check for this condition and tries to create a file anyway, which results in a fatal error calling a function on a non-object.
$fileObject = $folder->createFile($fileName)->setContents($externalFile);
Actions