diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 343645a486b..63804a616e9 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -752,7 +752,7 @@ $heightforframes=52; // 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;