diff --git a/typo3/sysext/install/Classes/Updates/RowUpdater/ImageCropUpdater.php b/typo3/sysext/install/Classes/Updates/RowUpdater/ImageCropUpdater.php index c1d69d19992f1b9f7637952a006b13ffbb247fc7..1d99eed28ef02c78e24419b7a97d380faa081bf4 100644 --- a/typo3/sysext/install/Classes/Updates/RowUpdater/ImageCropUpdater.php +++ b/typo3/sysext/install/Classes/Updates/RowUpdater/ImageCropUpdater.php @@ -21,7 +21,6 @@ use TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException; use TYPO3\CMS\Core\Resource\ResourceFactory; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\MathUtility; -use TYPO3\CMS\Install\Service\LoadTcaService; /** * Migrate values for database records having columns @@ -29,16 +28,6 @@ use TYPO3\CMS\Install\Service\LoadTcaService; */ class ImageCropUpdater implements RowUpdaterInterface { - /** - * @var array Full, migrated TCA as prepared by upgrade wizard controller - */ - protected $migratedTca; - - /** - * @var array Full, but NOT migrated TCA - */ - protected $notMigratedTca; - /** * List of tables with information about to migrate fields. * Created during hasPotentialUpdateForTable(), used in updateTableRow() @@ -47,18 +36,6 @@ class ImageCropUpdater implements RowUpdaterInterface */ protected $payload = []; - /** - * Prepare non-migrated TCA to be used in 'hasPotentialUpdateForTable' step - */ - public function __construct() - { - $this->migratedTca = $GLOBALS['TCA']; - $loadTcaService = GeneralUtility::makeInstance(LoadTcaService::class); - $loadTcaService->loadExtensionTablesWithoutMigration(); - $this->notMigratedTca = $GLOBALS['TCA']; - $GLOBALS['TCA'] = $this->migratedTca; - } - /** * Get title * @@ -77,14 +54,12 @@ class ImageCropUpdater implements RowUpdaterInterface */ public function hasPotentialUpdateForTable(string $tableName): bool { - $GLOBALS['TCA'] = $this->notMigratedTca; $result = false; $payload = $this->getPayloadForTable($tableName); if (count($payload) !== 0) { $this->payload[$tableName] = $payload; $result = true; } - $GLOBALS['TCA'] = $this->migratedTca; return $result; } @@ -217,7 +192,7 @@ class ImageCropUpdater implements RowUpdaterInterface } if (MathUtility::canBeInterpretedAsInteger($fileUid)) { try { - $file = ResourceFactory::getInstance()->getFileObject($fileUid); + $file = ResourceFactory::getInstance()->getFileObject((int)$fileUid); } catch (FileDoesNotExistException $e) { } catch (\InvalidArgumentException $e) { }