Skip to content

Commit a822586

Browse files
committed
Fixing render
1 parent aa91b6c commit a822586

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
if (!is_null($route)){
5757
if (isset($route['controller'])) {
58-
58+
5959
$controlling = explode('::',$route['controller']);
6060

6161
$controller = $controlling[0];
@@ -64,18 +64,18 @@
6464
$controller->addFunctions(array($assets, $path));
6565
$method = $controlling[1];
6666

67-
call_user_func_array(array($controller, $method), $route['route_params']);
68-
67+
echo call_user_func_array(array($controller, $method), $route['route_params']);
68+
6969
}elseif (isset($route['template'])) {
7070

7171
$twiger = new Twiger( array_merge($constants, $route['params']) );
7272
$twiger->addFunctions(array($assets, $path));
73-
$twiger->render($route['template'].'.html.twig', $route['route_params'] );
73+
echo $twiger->render($route['template'].'.html.twig', $route['route_params'] );
7474

7575
}
7676
}else{
7777
$twiger = new Twiger();
7878
$twiger->addFunctions(array($assets, $path));
79-
$twiger->render('404.html.twig', array('route' => $requestUri));
79+
echo $twiger->render('404.html.twig', array('route' => $requestUri));
8080
http_response_code(404);
8181
}

0 commit comments

Comments
 (0)