Skip to content
Snippets Groups Projects
Commit 610e8beb authored by Frans Saris's avatar Frans Saris Committed by Wouter Wolters
Browse files

[BUGFIX] Exception thrown in update wizard if file does not exists

When fetching a file that does not exists a exception is
thrown in the update wizard to update RTE file links to FAL.
The exception will now be catched.

Resolves: #53127
Releases: 6.2
Change-Id: I81a204506abfe2f462142ccc504f3a4e2cef138f
Reviewed-on: https://review.typo3.org/25004
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
parent 66a79672
Branches
Tags
No related merge requests found
......@@ -204,7 +204,12 @@ class RteFileLinksUpdateWizard extends AbstractUpdate {
*/
protected function convertFileLinks(array $reference, array $record) {
// First of all, try to get the referenced file. Continue only if found.
$fileObject = $this->fetchReferencedFile($reference['ref_string'], $reference);
try {
$fileObject = $this->fetchReferencedFile($reference['ref_string'], $reference);
} catch (\InvalidArgumentException $exception) {
$fileObject = NULL;
$this->errors[] = $reference['ref_string'] . ' could not be replaced. File does not exist.';
}
if ($fileObject instanceof \TYPO3\CMS\Core\Resource\AbstractFile) {
// Next, match the reference path in the content to be sure it's present inside a <link> tag
$content = $record[$reference['field']];
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment