From: Roland Häder Date: Fri, 20 Jun 2008 18:09:05 +0000 (+0000) Subject: Method call on non-object fixed X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=commitdiff_plain;h=6d7c43fba1fd9b5e72ef8ed2e6ada54ecc94f21e Method call on non-object fixed --- diff --git a/inc/classes/main/controller/default/class_WebDefaultNewsController.php b/inc/classes/main/controller/default/class_WebDefaultNewsController.php index f623f84..e0f506a 100644 --- a/inc/classes/main/controller/default/class_WebDefaultNewsController.php +++ b/inc/classes/main/controller/default/class_WebDefaultNewsController.php @@ -67,15 +67,15 @@ class WebDefaultNewsController extends BaseController implements Controller { * @return void */ public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) { + // Get the command instance from the resolver by sending a request instance to the resolver + $commandInstance = $this->getResolverInstance()->resolvCommandByRequest($requestInstance); + // Add more filters by the command $commandInstance->addExtraFilters($this); // Run the pre filters $this->executePreFilters($requestInstance, $responseInstance); - // Get the command instance from the resolver by sending a request instance to the resolver - $commandInstance = $this->getResolverInstance()->resolvCommandByRequest($requestInstance); - // This request was valid! :-D $requestInstance->requestIsValid(); diff --git a/inc/classes/main/controller/default/class_WebLoginController.php b/inc/classes/main/controller/default/class_WebLoginController.php index 28378f3..5bc762c 100644 --- a/inc/classes/main/controller/default/class_WebLoginController.php +++ b/inc/classes/main/controller/default/class_WebLoginController.php @@ -66,15 +66,15 @@ class WebLoginController extends BaseController implements Controller { * @return void */ public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) { + // Get the command instance from the resolver by sending a request instance to the resolver + $commandInstance = $this->getResolverInstance()->resolvCommandByRequest($requestInstance); + // Add more filters by the command $commandInstance->addExtraFilters($this); // Run the pre filters $this->executePreFilters($requestInstance, $responseInstance); - // Get the command instance from the resolver by sending a request instance to the resolver - $commandInstance = $this->getResolverInstance()->resolvCommandByRequest($requestInstance); - // This request was valid! :-D $requestInstance->requestIsValid(); diff --git a/inc/classes/main/controller/login/class_WebLoginAreaController.php b/inc/classes/main/controller/login/class_WebLoginAreaController.php index c43c897..4bc6f29 100644 --- a/inc/classes/main/controller/login/class_WebLoginAreaController.php +++ b/inc/classes/main/controller/login/class_WebLoginAreaController.php @@ -77,6 +77,9 @@ class WebLoginAreaController extends BaseController implements Controller { * @return void */ public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) { + // Get the command instance from the resolver by sending a request instance to the resolver + $commandInstance = $this->getResolverInstance()->resolvCommandByRequest($requestInstance); + // Add more filters by the command $commandInstance->addExtraFilters($this); @@ -89,9 +92,6 @@ class WebLoginAreaController extends BaseController implements Controller { $responseInstance->redirectToConfiguredUrl('login_failed_url'); } - // Get the command instance from the resolver by sending a request instance to the resolver - $commandInstance = $this->getResolverInstance()->resolvCommandByRequest($requestInstance); - // This request was valid! :-D $requestInstance->requestIsValid();