diff --git a/includes/components/response/templateresponse.class.php b/includes/components/response/templateresponse.class.php index 4b165c82..6353e87d 100644 --- a/includes/components/response/templateresponse.class.php +++ b/includes/components/response/templateresponse.class.php @@ -37,14 +37,20 @@ trait TrListPage public function getCacheKeyComponents() : array { // max. 3 catgs - // catg max 65535 + // catg max 32767 - largest in use should be 11.197.26801 (Spells: Professions > Tailoring > Spellfire Tailoring) if ($this->category) { $catg = 0x0; for ($i = 0; $i < 3; $i++) { - $catg <<= 4; - $catg |= ($this->category[$i] ?? 0) & 0xFFFF; + $catg <<= 4 * 4; + if (!isset($this->category[$i])) + continue; + + if ($this->category[$i]) + $catg |= ($this->category[$i] << 1) & 0xFFFF; + else + $catg |= 1; } } diff --git a/includes/kernel.php b/includes/kernel.php index 00a4414d..b2f43938 100644 --- a/includes/kernel.php +++ b/includes/kernel.php @@ -6,7 +6,7 @@ mb_internal_encoding('UTF-8'); error_reporting(E_ALL); mysqli_report(MYSQLI_REPORT_ERROR); -define('AOWOW_REVISION', 42); +define('AOWOW_REVISION', 43); define('OS_WIN', substr(PHP_OS, 0, 3) == 'WIN'); // OS_WIN as per compile info of php define('CLI', PHP_SAPI === 'cli'); define('CLI_HAS_E', CLI && // WIN10 and later usually support ANSI escape sequences