fix: replace raw array access with data_get() to prevent Undefined array key

- Migrate $protocol_settings['key'] to data_get($protocol_settings, 'key') across General, SingBox, Shadowrocket, Surfboard, QuantumultX
- Prevents PHP 8 Undefined array key fatal errors when optional protocol_settings fields are missing
- Same class of bug that caused #735
This commit is contained in:
Dlphine
2026-03-27 13:49:50 +08:00
parent a6c37bb112
commit 5dd4cd4bc9
5 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ class QuantumultX extends AbstractProtocol
$addr = Helper::wrapIPv6($server['host']);
$config = [
"shadowsocks={$addr}:{$server['port']}",
"method={$protocol_settings['cipher']}",
"method=" . data_get($protocol_settings, 'cipher'),
"password={$password}",
];