From cfb8cad454cdc12c78fad74281955e30e3cc615b Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 29 Nov 2017 19:43:04 +0100 Subject: [PATCH] Prepare install application --- Dispatcher/Dispatcher.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dispatcher/Dispatcher.php b/Dispatcher/Dispatcher.php index a8e77ddc8..fcf6aa262 100644 --- a/Dispatcher/Dispatcher.php +++ b/Dispatcher/Dispatcher.php @@ -106,13 +106,13 @@ class Dispatcher { $views = []; $dispatch = explode(':', $controller); - $this->getController($dispatch[0]); if (($c = count($dispatch)) === 3) { /* Handling static functions */ $function = $dispatch[0] . '::' . $dispatch[2]; $views[$controller] = $function(...$data); } elseif ($c === 2) { + $this->getController($dispatch[0]); $views[$controller] = $this->controllers[$dispatch[0]]->{$dispatch[1]}(...$data); } else { throw new \UnexpectedValueException('Unexpected function.'); @@ -200,4 +200,4 @@ class Dispatcher { $this->controllers[$name] = $controller; } -} +} \ No newline at end of file