Commit 1068465a authored by Thomas Löffler's avatar Thomas Löffler
Browse files

Check if a lastVersion exists in showAction

parent 78624705
Pipeline #2284 passed with stages
in 1 minute and 36 seconds
......@@ -200,7 +200,10 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController
$versionHistoryCount = (!empty($this->settings['versionHistoryCount']) ? $this->settings['versionHistoryCount'] : 5);
$skipLatestVersion = (isset($this->settings['skipLatestVersion']) ? $this->settings['skipLatestVersion'] : true);
if ($extension !== null && $extension instanceof \T3o\TerFe2\Domain\Model\Extension) {
if ($extension !== null
&& $extension instanceof \T3o\TerFe2\Domain\Model\Extension
&& $extension->getLastVersion() instanceof \T3o\TerFe2\Domain\Model\Version
) {
$versionHistory = $this->versionRepository->getVersionHistory($extension, $versionHistoryCount, $skipLatestVersion);
$this->view->assign('owner', $owner);
$this->view->assign('extension', $extension);
......
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