[BUGFIX] Throw Exception if typo3 extension repository is not defined
[Packages/TYPO3.CMS.git] / typo3 / sysext / extensionmanager / Classes / Utility / Repository / Helper.php
index 1e8551e..580586c 100644 (file)
@@ -83,9 +83,12 @@ class Helper implements \TYPO3\CMS\Core\SingletonInterface {
                $repositoryRepository = $this->objectManager->get('TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\RepositoryRepository');
                $this->extensionRepository = $this->objectManager->get('TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\ExtensionRepository');
                $repository = $repositoryRepository->findByUid(1);
                $repositoryRepository = $this->objectManager->get('TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\RepositoryRepository');
                $this->extensionRepository = $this->objectManager->get('TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\ExtensionRepository');
                $repository = $repositoryRepository->findByUid(1);
-               if (is_object($repository)) {
-                       $this->setRepository($repository);
+
+               if(!is_object($repository)) {
+                       throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException('The typo3.org extension repository was not found. Please go to the "Update Wizard" in the install tool and run the task "Add the default Extension Manager database tables".', 1365192900);
                }
                }
+
+               $this->setRepository($repository);
        }
 
        /**
        }
 
        /**