Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
services
t3o sites
extensions.typo3.org
extensions.typo3.org
Commits
7251aae7
Commit
7251aae7
authored
Sep 21, 2017
by
Thomas Löffler
Browse files
Better handling for wrong or no extension key given
parent
b8aae07c
Pipeline
#2298
passed with stages
in 1 minute and 39 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
html/typo3conf/ext/ter_fe2/Classes/Controller/ExtensionController.php
View file @
7251aae7
...
...
@@ -180,18 +180,13 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController
* Action that displays a single extension
*
* @param \T3o\TerFe2\Domain\Model\Extension $extension The extension to display
* @param string $extensionKey Extension key
* @return void
*
* @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
(
!
is_string
(
$extensionKey
))
{
throw
new
\
Exception
(
'No valid extension key given'
);
}
$extension
=
$this
->
extensionRepository
->
findOneByExtKey
(
$extensionKey
);
if
(
$extension
===
null
||
!
$extension
instanceof
\
T3o\TerFe2\Domain\Model\Extension
)
{
$GLOBALS
[
'TSFE'
]
->
pageNotFoundAndExit
(
'Extension not found!'
);
}
$owner
=
array
();
if
(
$extension
instanceof
\
T3o\TerFe2\Domain\Model\Extension
and
$extension
->
getFrontendUser
())
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment