Strict comparisons.

This commit is contained in:
James Cole
2017-07-15 16:41:07 +02:00
parent c03ab269f0
commit 22144b78ea
59 changed files with 110 additions and 107 deletions

View File

@@ -110,7 +110,7 @@ class General extends Twig_Extension
$what = $args[2]; // name of the route.
$activeWhat = $context['what'] ?? false;
if ($what == $activeWhat && !(strpos(Route::getCurrentRoute()->getName(), $route) === false)) {
if ($what === $activeWhat && !(strpos(Route::getCurrentRoute()->getName(), $route) === false)) {
return 'active';
}
@@ -132,7 +132,7 @@ class General extends Twig_Extension
$args = func_get_args();
$route = $args[0]; // name of the route.
if (Route::getCurrentRoute()->getName() == $route) {
if (Route::getCurrentRoute()->getName() === $route) {
return 'active';
}