Skip to content
Snippets Groups Projects

Bugfix on save hooks not being executed

Merged Kevin von Spiczak requested to merge bugfix_OnSaveHooksNotBeingExecuted into master
@@ -85,7 +85,6 @@ class ConsistenceService implements SingletonInterface {
return FALSE;
}
return !in_array($objectId, $this->processedIds[$entityType], TRUE);
}
@@ -98,16 +97,18 @@ class ConsistenceService implements SingletonInterface {
* @param array $additionalInformation
* @return bool
*/
public function repairConsistence(int $objectId, string $entityType, string $operation, array $additionalInformation = []): bool {
public function repairConsistence(
int $objectId, string $entityType, string $operation, array $additionalInformation = []
): bool {
$registeredServiceKey = array_search($entityType, $this->allowedEntityTypes);
$registeredService = $this->registeredServices[$registeredServiceKey];
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '10.4.0', '<')){
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '10.4.0', '<')) {
// this can be removed if TYPO3 9 support is dropped
try {
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
/** @var AbstractConsistence $consistenceClass */
$consistenceClass = $objectManager->get($registeredService['consistenceClass']);
} catch(ObjectException $exception) {
} catch (ObjectException $exception) {
return FALSE;
}
} else {
@@ -165,11 +166,11 @@ class ConsistenceService implements SingletonInterface {
$registeredServiceKey = array_search($entityType, $this->allowedEntityTypes);
$registeredService = $this->registeredServices[$registeredServiceKey];
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '10.4.0', '<')){
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '10.4.0', '<')) {
// this can be removed if TYPO3 9 support is dropped
try {
$consistenceClass = $objectManager->get($registeredService['consistenceClass']);
} catch(ObjectException $exception) {
} catch (ObjectException $exception) {
return FALSE;
}
} else {
Loading