Skip to content

Commit 88be442

Browse files
Merge pull request SimpleMachines#9109 from Sesquipedalian/3.0/php85
[3.0] Compatibility with PHP 8.5
2 parents 1e9d705 + afee649 commit 88be442

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
runs-on: ubuntu-latest
4242
strategy:
4343
matrix:
44-
php: [ 8.0, 8.1, 8.2, 8.3, 8.4 ]
44+
php: [ 8.0, 8.1, 8.2, 8.3, 8.4, 8.5 ]
4545

4646
name: PHP ${{ matrix.php }} Syntax Check
4747
steps:

Sources/Board.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,13 +913,13 @@ public static function init(?int $id = null, array $props = []): ?self
913913
self::$board_id = (int) ($_REQUEST['board'] ?? 0);
914914
}
915915

916-
if (!isset(self::$loaded[$id])) {
916+
if (!isset($id, self::$loaded[$id])) {
917917
new self($id, $props);
918918
} else {
919919
self::$loaded[$id]->set($props);
920920
}
921921

922-
return self::$loaded[$id] ?? null;
922+
return self::$loaded[$id ?? self::$board_id] ?? null;
923923
}
924924

925925
/**

Sources/Theme.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2079,11 +2079,11 @@ protected function loadTemplatesAndLangFiles(): void
20792079
(Forum::getCurrentAction())?->isSimpleAction() === true
20802080
|| \in_array(Utils::$context['current_action'], $this->simpleActions)
20812081
|| (
2082-
isset($this->simpleAreas[Utils::$context['current_action']], $_REQUEST['area'])
2082+
isset(Utils::$context['current_action'], $this->simpleAreas[Utils::$context['current_action']], $_REQUEST['area'])
20832083
&& \in_array($_REQUEST['area'], $this->simpleAreas[Utils::$context['current_action']])
20842084
)
20852085
|| (
2086-
isset($this->simpleSubActions[Utils::$context['current_action']])
2086+
isset(Utils::$context['current_action'], $this->simpleSubActions[Utils::$context['current_action']])
20872087
&& \in_array(Utils::$context['current_subaction'], $this->simpleSubActions[Utils::$context['current_action']])
20882088
)
20892089
);

0 commit comments

Comments
 (0)