Fix: Ensure string type for urlencode()

This commit is contained in:
MDW
2024-03-08 02:48:59 +01:00
parent 448e4ae322
commit 92ae7239cb

View File

@@ -1963,7 +1963,7 @@ if ($action == 'create') {
$thirdparty = $soc;
$discount_type = 0;
$backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode(GETPOST('origin')).'&originid='.urlencode(GETPOSTINT('originid'));
$backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode((string) (GETPOST('origin'))).'&originid='.urlencode((string) (GETPOSTINT('originid')));
include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
print '</td></tr>';
}