Skip to content

Commit

Permalink
Fix theme casting
Browse files Browse the repository at this point in the history
  • Loading branch information
jdarwood007 committed Aug 7, 2024
1 parent 436eb0d commit 827beef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public static function load(int $id = 0, bool $initialize = true): self
}
// The theme is the forum's default.
else {
$id = Config::$modSettings['theme_guests'] ?? 1;
$id = (int) Config::$modSettings['theme_guests'] ?? 1;
}

// Sometimes the user can choose their own theme.
Expand Down Expand Up @@ -228,7 +228,7 @@ public static function load(int $id = 0, bool $initialize = true): self
$themes = explode(',', Config::$modSettings['enableThemes']);

if (!in_array($id, $themes)) {
$id = Config::$modSettings['theme_guests'];
$id = (int) Config::$modSettings['theme_guests'];
} else {
$id = (int) $id;
}
Expand Down

0 comments on commit 827beef

Please sign in to comment.