Commit 8e901bc9 authored by Tomas Norre Mikkelsen's avatar Tomas Norre Mikkelsen
Browse files

Merge branch '149-https-extensions-typo3-org-extension-should-throw-a-404' into 'develop'

Resolve "https://extensions.typo3.org/extension/ should throw a 404"

Closes #149

See merge request !224
parents 7e278c20 7251aae7
Pipeline #2304 failed with stages
in 4 minutes and 32 seconds
...@@ -180,18 +180,13 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController ...@@ -180,18 +180,13 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController
* Action that displays a single extension * Action that displays a single extension
* *
* @param \T3o\TerFe2\Domain\Model\Extension $extension The extension to display * @param \T3o\TerFe2\Domain\Model\Extension $extension The extension to display
* @param string $extensionKey Extension key
* @return void
*
* @ignorevalidation $extension * @ignorevalidation $extension
* @return void
*/ */
public function showAction(\T3o\TerFe2\Domain\Model\Extension $extension = null, $extensionKey = null) public function showAction(\T3o\TerFe2\Domain\Model\Extension $extension = null)
{ {
if (!empty($extensionKey)) { if ($extension === null || !$extension instanceof \T3o\TerFe2\Domain\Model\Extension) {
if (!is_string($extensionKey)) { $GLOBALS['TSFE']->pageNotFoundAndExit('Extension not found!');
throw new \Exception('No valid extension key given');
}
$extension = $this->extensionRepository->findOneByExtKey($extensionKey);
} }
$owner = array(); $owner = array();
if ($extension instanceof \T3o\TerFe2\Domain\Model\Extension and $extension->getFrontendUser()) { if ($extension instanceof \T3o\TerFe2\Domain\Model\Extension and $extension->getFrontendUser()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment