#52140saveAction function fails
Description
Hi,
The saveAction() fails when it’s called from an extension not in the TER.
The reason why it fail is this check:
if ($extension->getCategory() === \TYPO3\CMS\Extensionmanager\Domain\Model\Extension::DISTRIBUTION_CATEGORY) {
If the extension is not in the TER the function:
$this->extensionRepository->findOneByCurrentVersionByExtensionKey($extensionKey);
Will return null, and therefor the getCategory() function is not existing.
I don’t know if this is a proper fix or it should be done somehow else, but doing the check like this:
if (NULL != $extension && extension->getCategory() === \TYPO3\CMS\Extensionmanager\Domain\Model\Extension::DISTRIBUTION_CATEGORY) {
it fix the issue. But as I wrote already, i’m not sure it’s the way to fix this.
Let me know what you think.
Cheers.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.