mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-26 22:46:53 -04:00
Fixed: Avoid zero-length array memory allocations
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FluentValidation;
|
||||
@@ -35,9 +36,9 @@ namespace NzbDrone.Core.Notifications.Email
|
||||
Port = 587;
|
||||
Ssl = true;
|
||||
|
||||
To = new string[] { };
|
||||
CC = new string[] { };
|
||||
Bcc = new string[] { };
|
||||
To = Array.Empty<string>();
|
||||
CC = Array.Empty<string>();
|
||||
Bcc = Array.Empty<string>();
|
||||
}
|
||||
|
||||
[FieldDefinition(0, Label = "Server", HelpText = "Hostname or IP of Email server")]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FluentValidation;
|
||||
using NzbDrone.Core.Annotations;
|
||||
@@ -20,8 +21,8 @@ namespace NzbDrone.Core.Notifications.PushBullet
|
||||
|
||||
public PushBulletSettings()
|
||||
{
|
||||
DeviceIds = new string[] { };
|
||||
ChannelTags = new string[] { };
|
||||
DeviceIds = Array.Empty<string>();
|
||||
ChannelTags = Array.Empty<string>();
|
||||
}
|
||||
|
||||
[FieldDefinition(0, Label = "Access Token", HelpLink = "https://www.pushbullet.com/#settings/account")]
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace NzbDrone.Core.Notifications.Pushover
|
||||
public PushoverSettings()
|
||||
{
|
||||
Priority = 0;
|
||||
Devices = new string[] { };
|
||||
Devices = System.Array.Empty<string>();
|
||||
}
|
||||
|
||||
//TODO: Get Pushover to change our app name (or create a new app) when we have a new logo
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FluentValidation;
|
||||
using NzbDrone.Core.Annotations;
|
||||
@@ -24,7 +25,7 @@ namespace NzbDrone.Core.Notifications.SendGrid
|
||||
public SendGridSettings()
|
||||
{
|
||||
BaseUrl = "https://api.sendgrid.com/v3/";
|
||||
Recipients = new string[] { };
|
||||
Recipients = Array.Empty<string>();
|
||||
}
|
||||
|
||||
public string BaseUrl { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user