Skip to content

Commit

Permalink
UI Core: 40906 use ampersand and question mark in preg_replace
Browse files Browse the repository at this point in the history
  • Loading branch information
shecken committed Mar 22, 2024
1 parent dc729fe commit 760bcce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Services/UICore/classes/class.ilCtrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ private function appendParameterString(
if (preg_match("/($ampersand|\?)$parameter_name(=|$)/", $url)) {
// replace the value appended to the given parameter
// name by the provided one.
$url = preg_replace("/(?<=($parameter_name=))([^&]*|$)/", (string) $value, $url);
$url = preg_replace("/(?<=(($ampersand|\?)$parameter_name=))([^&]*|$)/", (string) $value, $url);
} else {
// append the parameter key => value pair and prepend
// a question mark or ampersand, determined by whether
Expand Down

0 comments on commit 760bcce

Please sign in to comment.