mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-05 12:40:52 +08:00
Fix: Handle null content in PlanResource::formatContent method
- Fix deprecated warning when passing null to str_replace() function\n- Use null coalescing operator to provide empty string as default value\n- Comply with PHP 8.2+ type requirements
This commit is contained in:
@@ -52,6 +52,8 @@ class ServerSave extends FormRequest
|
||||
'reality_settings.public_key' => 'nullable|string',
|
||||
'reality_settings.private_key' => 'nullable|string',
|
||||
'reality_settings.short_id' => 'nullable|string',
|
||||
],
|
||||
'socks' => [
|
||||
]
|
||||
];
|
||||
|
||||
@@ -81,7 +83,7 @@ class ServerSave extends FormRequest
|
||||
{
|
||||
$type = $this->input('type');
|
||||
$rules = $this->getBaseRules();
|
||||
|
||||
|
||||
foreach (self::PROTOCOL_RULES[$type] ?? [] as $field => $rule) {
|
||||
$rules['protocol_settings.' . $field] = $rule;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user