This prevents a call to a member function getPrimaryController() on a non-object in Route.class.php and allows uninstallation of applications again.
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;
}