launcher.php: fix PHP 8 fatal in saveManifest

`usort($manifest['versions'] ?? [], ...)` worked in PHP 7 but is a
fatal error in PHP 8 — usort requires its first arg by reference and
the null-coalesce operator produces an rvalue, not a variable. The
existing versions.php didn't trigger it because it sorts
$manifest['versions'] directly. Fixed launcher.php to guard with an
isset/is_array check and only sort when there's actually a versions
array.

Triggered by clicking "Définir" in the new Launcher page → 500 page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-02 11:21:29 +02:00
parent c24e67f560
commit 03483d02e1
3 changed files with 7 additions and 4 deletions

BIN
PSLauncher-0.6.0.exe.bak Normal file

Binary file not shown.