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('/(?