mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-14 19:40:53 +08:00
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:
@@ -434,8 +434,8 @@ class SingBox extends AbstractProtocol
|
||||
$array['flow'] = $flow;
|
||||
}
|
||||
|
||||
if ($protocol_settings['tls']) {
|
||||
$tlsMode = (int) $protocol_settings['tls'];
|
||||
if (data_get($protocol_settings, 'tls')) {
|
||||
$tlsMode = (int) data_get($protocol_settings, 'tls', 0);
|
||||
$tlsConfig = [
|
||||
'enabled' => true,
|
||||
'insecure' => $tlsMode === 2
|
||||
|
||||
Reference in New Issue
Block a user