Skip to content

Commit

Permalink
check if form ext is loaded. #3
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Wappler committed Sep 4, 2023
1 parent be97f6f commit ed8bd0c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Classes/Updates/v104/FormFileExtensionUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use TYPO3\CMS\Core\Resource\DuplicationBehavior;
use TYPO3\CMS\Core\Resource\File;
use TYPO3\CMS\Core\Resource\ResourceFactory;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\PathUtility;
use TYPO3\CMS\Form\Mvc\Persistence\FormPersistenceManager;
Expand Down Expand Up @@ -126,6 +127,10 @@ public function updateNecessary(): bool
{
$updateNeeded = false;

if (ExtensionManagementUtility::isLoaded('form') === false) {
return false;
}

$this->persistenceManager = GeneralUtility::makeInstance(FormPersistenceManagerInterface::class);
$this->resourceFactory = GeneralUtility::makeInstance(ResourceFactory::class);

Expand Down

0 comments on commit ed8bd0c

Please sign in to comment.