diff options
| author | horus | 2021-02-24 15:32:31 +0100 |
|---|---|---|
| committer | horus | 2021-02-24 15:32:31 +0100 |
| commit | 965346bf5d441cd305378f703e586f1b98da7367 (patch) | |
| tree | afa5cbada42d20ff16fa7db5d75de253549f90cd /app.php | |
| parent | e4149f7c536199575a1e6b2b8b54eec1c3c1160c (diff) | |
| download | moehring-965346bf5d441cd305378f703e586f1b98da7367.tar.gz | |
bug fix in routing
Diffstat (limited to 'app.php')
| -rw-r--r-- | app.php | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -6,7 +6,8 @@ $loader = new \Twig\Loader\FilesystemLoader(__DIR__ . '/views'); $twig = new \Twig\Environment($loader); # no cache $function = new \Twig\TwigFunction('is_active', function($route) { - if ( $_SERVER['REQUEST_URI'] == $route ) { + $url = strtok($_SERVER["REQUEST_URI"], '?'); + if ( $url == $route ) { echo " active "; } }); |
