Fix: Ensure string type for urlencode()
This commit is contained in:
parent
6dbabaa514
commit
f12e03cdc1
1 changed files with 2 additions and 2 deletions
|
|
@ -235,7 +235,7 @@ if ($reshook < 0) {
|
|||
}
|
||||
|
||||
// Action called when page is submitted
|
||||
if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conference->status==2 || !empty($project->id) && $project->status == Project::STATUS_VALIDATED)) {
|
||||
if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conference->status == 2 || !empty($project->id) && $project->status == Project::STATUS_VALIDATED)) {
|
||||
$error = 0;
|
||||
|
||||
$urlback = '';
|
||||
|
|
@ -600,7 +600,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||
// Now we redirect to the payment page
|
||||
$sourcetouse = 'organizedeventregistration';
|
||||
$reftouse = $facture->id;
|
||||
$redirection = $dolibarr_main_url_root.'/public/payment/newpayment.php?source='.urlencode($sourcetouse).'&ref='.urlencode($reftouse);
|
||||
$redirection = $dolibarr_main_url_root.'/public/payment/newpayment.php?source='.urlencode((string) ($sourcetouse)).'&ref='.urlencode((string) ($reftouse));
|
||||
if (getDolGlobalString('PAYMENT_SECURITY_TOKEN')) {
|
||||
if (getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) {
|
||||
$redirection .= '&securekey='.dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN') . $sourcetouse . $reftouse, 2); // Use the source in the hash to avoid duplicates if the references are identical
|
||||
|
|
|
|||
Loading…
Reference in a new issue