From 0588000da3264a2111593a01e34d8cb20db13b5b Mon Sep 17 00:00:00 2001 From: Jon Stovell Date: Wed, 25 Dec 2024 13:38:53 -0700 Subject: [PATCH] Replaces uses of deprecated constant SID with calls to session_id() Signed-off-by: Jon Stovell --- Sources/QueryString.php | 14 +++++++------- Sources/Subs.php | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Sources/QueryString.php b/Sources/QueryString.php index 86a99439f2..6a147dd263 100644 --- a/Sources/QueryString.php +++ b/Sources/QueryString.php @@ -648,14 +648,14 @@ function ob_sessrewrite($buffer) { global $scripturl, $modSettings, $context; - // If $scripturl is set to nothing, or the SID is not defined (SSI?) just quit. - if ($scripturl == '' || !defined('SID')) + // If $scripturl is set to nothing, or the session ID is not defined (SSI?) just quit. + if ($scripturl == '' || session_id() === false) return $buffer; // Do nothing if the session is cookied, or they are a crawler - guests are caught by redirectexit(). This doesn't work below PHP 4.3.0, because it makes the output buffer bigger. // @todo smflib - if (empty($_COOKIE) && SID != '' && !isBrowser('possibly_robot')) - $buffer = preg_replace('/(?