From 2273667252b5dbcbb7ec101c84b77ab12097e051 Mon Sep 17 00:00:00 2001 From: Maximilian Mader Date: Tue, 16 Dec 2014 21:03:52 +0100 Subject: [PATCH] Fix issue when uninstalling applications This prevents a call to a member function getPrimaryController() on a non-object in Route.class.php and allows uninstallation of applications again. --- .../install/files/lib/system/request/Route.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/request/Route.class.php b/wcfsetup/install/files/lib/system/request/Route.class.php index 645e676d47..3b529626b8 100644 --- a/wcfsetup/install/files/lib/system/request/Route.class.php +++ b/wcfsetup/install/files/lib/system/request/Route.class.php @@ -361,7 +361,14 @@ class Route { self::$defaultControllers = array(); foreach (ApplicationHandler::getInstance()->getApplications() as $application) { - $controller = WCF::getApplicationObject($application)->getPrimaryController(); + $app = WCF::getApplicationObject($application); + + if (!$app) { + continue; + } + + $controller = $app->getPrimaryController(); + if (!$controller) { continue; } -- 2.20.1