From 93ab0dba88bc9f7f2c8349163f6e3143fc99f653 Mon Sep 17 00:00:00 2001 From: Gimli2 Date: Fri, 26 May 2023 17:02:38 +0200 Subject: [PATCH] Handle case if SID constant is not defined. --- sigal.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/sigal.class.php b/sigal.class.php index 31c7774..e01a5d8 100644 --- a/sigal.class.php +++ b/sigal.class.php @@ -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); } /*========================================================================*/