fix: PHP Warning in state.php (#1126)

PHP 8.4.4 (Unraid 7.1.0): Implicitly marking parameter $subkey as
nullable is deprecated

Related: https://github.com/unraid/webgui/pull/2009

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Improved internal handling of optional details, enhancing system
robustness and flexibility when certain inputs are omitted. This update
contributes to smoother, more reliable operations without affecting
visible functionality.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
ljm42
2025-02-10 11:58:30 -07:00
committed by GitHub
parent 6abddd85d2
commit 59d6c1b678

View File

@@ -124,7 +124,7 @@ class ServerState
/**
* Retrieve the value of a webgui global setting.
*/
public function getWebguiGlobal(string $key, string $subkey = null)
public function getWebguiGlobal(string $key, ?string $subkey = null)
{
if (!$subkey) {
return _var($this->webguiGlobals, $key, '');