diff --git a/typo3/sysext/install/Classes/Updates/FrontendUserImageUpdateWizard.php b/typo3/sysext/install/Classes/Updates/FrontendUserImageUpdateWizard.php index bc51c1ec2457a287c1d4ba5ff867db0ebac9715e..3989311a1ec868cee12bdb73b8ad3d40d234aa88 100644 --- a/typo3/sysext/install/Classes/Updates/FrontendUserImageUpdateWizard.php +++ b/typo3/sysext/install/Classes/Updates/FrontendUserImageUpdateWizard.php @@ -19,6 +19,7 @@ use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction; use TYPO3\CMS\Core\Log\Logger; use TYPO3\CMS\Core\Log\LogManager; use TYPO3\CMS\Core\Registry; +use TYPO3\CMS\Core\Resource\File; use TYPO3\CMS\Core\Resource\ResourceStorage; use TYPO3\CMS\Core\Resource\StorageRepository; use TYPO3\CMS\Core\Utility\GeneralUtility; @@ -123,13 +124,17 @@ class FrontendUserImageUpdateWizard extends AbstractUpdate */ public function checkForUpdate(&$description) { + if ($this->isWizardDone()) { + return false; + } + $description = 'This update wizard goes through all files that are referenced in the fe_users.image field' . ' and adds the files to the FAL File Index.<br />' . 'It also moves the files from uploads/ to the fileadmin/_migrated/ path.'; $this->init(); - return !$this->isWizardDone() || $this->recordOffset !== []; + return $this->recordOffset !== []; } /** @@ -285,6 +290,7 @@ class FrontendUserImageUpdateWizard extends AbstractUpdate try { // if the source file does not exist, we should just continue, but leave a message in the docs; // ideally, the user would be informed after the update as well. + /** @var File $file */ $file = $this->storage->getFile($this->targetPath . $item); $fileUid = $file->getUid(); } catch (\InvalidArgumentException $e) {