From 9b342a6ba59705a9c364d16fe8a671e1e7705a4c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 22 Mar 2011 21:12:32 +0000 Subject: [PATCH] Set application instance first (to prevent a NPE in BaseRegistry) --- application/install/class_ApplicationHelper.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/application/install/class_ApplicationHelper.php b/application/install/class_ApplicationHelper.php index 4993977..58c7e03 100644 --- a/application/install/class_ApplicationHelper.php +++ b/application/install/class_ApplicationHelper.php @@ -84,7 +84,7 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication // Is the instance there? if (is_null(self::$thisInstance)) { self::$thisInstance = new ApplicationHelper(); - } + } // END - if // Return the instance return self::$thisInstance; @@ -172,6 +172,9 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication * @return void */ public final function entryPoint () { + // Set this application in registry + Registry::getRegistry()->addInstance('app', $this); + // Create a new request object $requestInstance = ObjectFactory::createObjectByName('HttpRequest'); @@ -179,8 +182,8 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication $this->setRequestInstance($requestInstance); // Default response is HTTP (HTML page) and type is "Web" - $response = "http"; - $responseType = "web"; + $response = 'http'; + $responseType = 'web'; // Do we have another response? if ($requestInstance->isRequestElementSet('request')) { -- 2.39.5