diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-24 21:07:32 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-24 21:07:32 +0100 |
| commit | 5d4f0299e24f7ae22f9f7d9be34dd28a9efbaa17 (patch) | |
| tree | 11b42af87f4de4a9b95d3033cbc0c87aa70d03eb /includes | |
| parent | 6246d6963e23a4b909998715141c65367e73ab70 (diff) | |
| download | kernel-5d4f0299e24f7ae22f9f7d9be34dd28a9efbaa17.tar.gz kernel-5d4f0299e24f7ae22f9f7d9be34dd28a9efbaa17.tar.bz2 kernel-5d4f0299e24f7ae22f9f7d9be34dd28a9efbaa17.zip | |
Allow null default in getConfig() for PHP 8.5 compatibility
string|null $pDefault coerced to '' internally; return type stays string
to avoid breaking callers.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'includes')
| -rwxr-xr-x | includes/classes/BitSystem.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/classes/BitSystem.php b/includes/classes/BitSystem.php index aa7b753..cbb11db 100755 --- a/includes/classes/BitSystem.php +++ b/includes/classes/BitSystem.php @@ -226,11 +226,11 @@ class BitSystem extends BitSingleton { * @param string $pDefault only manipulate settings with this value set * @access public **/ - public function getConfig( string $pName, string $pDefault = '' ): string { + public function getConfig( string $pName, string|null $pDefault = null ): string { if( empty( $this->mConfig ) ) { $this->loadConfig(); } - return empty( $this->mConfig[$pName] ) ? $pDefault : $this->mConfig[$pName]; + return empty( $this->mConfig[$pName] ) ? ($pDefault ?? '') : $this->mConfig[$pName]; } // <<< getConfigMatch |
