diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 0480ffdb6aa..2fcae84a917 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -742,7 +742,7 @@ $heightforframes=48; // Switch to another entity if (! empty($conf->multicompany->enabled) && GETPOST('action') == 'switchentity') { - if ($mc->switchEntity(GETPOST('entity')) >= 0) + if ($mc->switchEntity(GETPOST('entity','int')) > 0) { Header("Location: ".DOL_URL_ROOT.'/'); exit;