N°7542 - code hardening

This commit is contained in:
Eric Espie
2024-05-30 12:04:36 +02:00
parent 32835f70b9
commit 3e3ac0d83f

View File

@@ -74,7 +74,7 @@ try
// First check if we can redirect the route to a dedicated controller
$sRoute = utils::ReadParam('route', '', false, utils::ENUM_SANITIZATION_FILTER_ROUTE);
$oRouter = Router::GetInstance();
if ($oRouter->CanDispatchRoute($sRoute)) {
if ($operation === '' && $oRouter->CanDispatchRoute($sRoute)) {
$mResponse = $oRouter->DispatchRoute($sRoute);
// If response isn't a \WebPage, it is most likely that the output already occured, stop the script.