diff --git a/application/menunode.class.inc.php b/application/menunode.class.inc.php index 09def76908..43ce751e5f 100644 --- a/application/menunode.class.inc.php +++ b/application/menunode.class.inc.php @@ -1548,6 +1548,12 @@ class ShortcutMenuNode extends MenuNode $sContext = $this->oShortcut->Get('context'); try { $aContext = utils::Unserialize($sContext, ['allowed_classes' => false]); + if (isset($aContext['menu'])) { + unset($aContext['menu']); + } + foreach ($aContext as $sArgName => $sArgValue) { + $aExtraParams[$sArgName] = $sArgValue; + } } catch (Exception $e) { IssueLog::Warning("User shortcut corrupted, delete the shortcut", LogChannels::CONSOLE, [ 'shortcut_name' => $this->oShortcut->GetName(), @@ -1556,12 +1562,6 @@ class ShortcutMenuNode extends MenuNode // delete the shortcut $this->oShortcut->DBDelete(); } - if (isset($aContext['menu'])) { - unset($aContext['menu']); - } - foreach ($aContext as $sArgName => $sArgValue) { - $aExtraParams[$sArgName] = $sArgValue; - } return parent::GetHyperlink($aExtraParams); }