Skip to content

Commit

Permalink
Handle case if SID constant is not defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
gimli2 committed May 26, 2023
1 parent 6863d2d commit 93ab0db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sigal.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1278,6 +1278,7 @@ function switch_lang() {
* @return string
*/
function remove_from_uri($param = "") {
if (!defined('SID')) define('SID', session_id());
return substr(preg_replace("~(?<=[?&])($param" . (SID ? "" : "|" . session_name()) . ")=[^&]*&~", '', "$_SERVER[REQUEST_URI]&"), 0, -1);
}
/*========================================================================*/
Expand Down

0 comments on commit 93ab0db

Please sign in to comment.