From 6164fd8522fca8896d07e2aa3538eb0547b3f921 Mon Sep 17 00:00:00 2001 From: Brian Foley Date: Wed, 3 Jun 2026 22:15:55 +0000 Subject: [PATCH 1/2] ProjectState: Quell PHP8.5 warnings about using null as array index --- pinc/ProjectState.inc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pinc/ProjectState.inc b/pinc/ProjectState.inc index dbe2aee621..a3e5e338aa 100644 --- a/pinc/ProjectState.inc +++ b/pinc/ProjectState.inc @@ -50,21 +50,33 @@ class ProjectStates public static function get_medium_label(?string $state): string { + if (is_null($state)) { + return ''; + } return self::$states[$state]->medium_label ?? ''; } public static function get_label(?string $state): string { + if (is_null($state)) { + return ''; + } return self::$states[$state]->label ?? ''; } public static function get_forum(?string $state): int { + if (is_null($state)) { + return -1; + } return self::$states[$state]->forum ?? -1; } public static function get_phase(?string $state): string { + if (is_null($state)) { + return 'NONE'; + } return self::$states[$state]->phase ?? 'NONE'; } } From b072236ec4f3e9e465dc19e61d2898dd72873eb0 Mon Sep 17 00:00:00 2001 From: Brian Foley Date: Wed, 3 Jun 2026 22:01:13 +0000 Subject: [PATCH 2/2] Add PHP 8.5 for linter, unit tests, and smoke tests PHP 8.5 is the default in Ubuntu 26.04 --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0cb1f5ff1a..eaeb76fdaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,7 @@ jobs: cfg: - { os: 'ubuntu-24.04', php: '8.3' } - { os: 'ubuntu-24.04', php: '8.4' } + - { os: 'ubuntu-24.04', php: '8.5' } runs-on: ${{ matrix.cfg.os }} steps: - name: Checkout Code @@ -40,6 +41,7 @@ jobs: cfg: - { os: 'ubuntu-24.04', php: '8.3' } - { os: 'ubuntu-24.04', php: '8.4' } + - { os: 'ubuntu-24.04', php: '8.5' } runs-on: ${{ matrix.cfg.os }} steps: - name: Checkout Code @@ -106,6 +108,7 @@ jobs: cfg: - { os: 'ubuntu-24.04', php: '8.3' } - { os: 'ubuntu-24.04', php: '8.4' } + - { os: 'ubuntu-24.04', php: '8.5' } runs-on: ${{ matrix.cfg.os }} steps: - name: Checkout Code