Merge pull request #23919 from hregis/fix_multiple_php8_compatibility

FIX wrong url param name action
This commit is contained in:
Laurent Destailleur 2023-02-16 21:10:35 +01:00 committed by GitHub
commit 7cefd3c6ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@
*/
/**
* \file htdocs/multicompany_page.php
* \file htdocs/core/multicompany_page.php
* \brief File to return a page with the list of all entities user can switch to
*/
@ -41,7 +41,7 @@ if (!defined('NOREQUIREMENU')) {
require_once '../main.inc.php';
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'aZ');
$entityid = GETPOST('entity', 'int');
$backtourl = GETPOST('backtourl');
if (empty($backtourl)) {
@ -63,7 +63,7 @@ $left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left');
* Actions
*/
if (GETPOST('acction', 'aZ') == 'switchentity') {
if ($action == 'switchentity') {
if (is_object($mc)) {
$mc->switchEntity($entityid);
}