fix: 🐛 Remove quotes from strings

This commit is contained in:
IceToast 2023-02-20 13:33:00 +01:00 committed by IceToast
parent 9124b2ddbd
commit a6a729a065
11 changed files with 55 additions and 0 deletions

View file

@ -109,6 +109,11 @@ class CreateGeneralSettings extends SettingsMigration
return null;
}
// remove the quotes from the string
if (substr($new_value->payload, 0, 1) === '"' && substr($new_value->payload, -1) === '"') {
return substr($new_value->payload, 1, -1);
}
return $new_value->payload;
}

View file

@ -62,6 +62,11 @@ class CreatePterodactylSettings extends SettingsMigration
return null;
}
// remove the quotes from the string
if (substr($new_value->payload, 0, 1) === '"' && substr($new_value->payload, -1) === '"') {
return substr($new_value->payload, 1, -1);
}
return $new_value->payload;
}

View file

@ -101,6 +101,11 @@ class CreateMailSettings extends SettingsMigration
return null;
}
// remove the quotes from the string
if (substr($new_value->payload, 0, 1) === '"' && substr($new_value->payload, -1) === '"') {
return substr($new_value->payload, 1, -1);
}
return $new_value->payload;
}
public function getOldValue(string $key)

View file

@ -127,6 +127,11 @@ class CreateUserSettings extends SettingsMigration
return null;
}
// remove the quotes from the string
if (substr($new_value->payload, 0, 1) === '"' && substr($new_value->payload, -1) === '"') {
return substr($new_value->payload, 1, -1);
}
return $new_value->payload;
}

View file

@ -60,6 +60,11 @@ class CreateServerSettings extends SettingsMigration
return null;
}
// remove the quotes from the string
if (substr($new_value->payload, 0, 1) === '"' && substr($new_value->payload, -1) === '"') {
return substr($new_value->payload, 1, -1);
}
return $new_value->payload;
}

View file

@ -92,6 +92,11 @@ class CreateInvoiceSettings extends SettingsMigration
return null;
}
// remove the quotes from the string
if (substr($new_value->payload, 0, 1) === '"' && substr($new_value->payload, -1) === '"') {
return substr($new_value->payload, 1, -1);
}
return $new_value->payload;
}

View file

@ -77,6 +77,11 @@ class CreateDiscordSettings extends SettingsMigration
return null;
}
// remove the quotes from the string
if (substr($new_value->payload, 0, 1) === '"' && substr($new_value->payload, -1) === '"') {
return substr($new_value->payload, 1, -1);
}
return $new_value->payload;
}

View file

@ -68,6 +68,11 @@ class CreateLocaleSettings extends SettingsMigration
return null;
}
// remove the quotes from the string
if (substr($new_value->payload, 0, 1) === '"' && substr($new_value->payload, -1) === '"') {
return substr($new_value->payload, 1, -1);
}
return $new_value->payload;
}

View file

@ -76,6 +76,11 @@ class CreateReferralSettings extends SettingsMigration
return null;
}
// remove the quotes from the string
if (substr($new_value->payload, 0, 1) === '"' && substr($new_value->payload, -1) === '"') {
return substr($new_value->payload, 1, -1);
}
return $new_value->payload;
}

View file

@ -107,6 +107,11 @@ class CreateWebsiteSettings extends SettingsMigration
return null;
}
// remove the quotes from the string
if (substr($new_value->payload, 0, 1) === '"' && substr($new_value->payload, -1) === '"') {
return substr($new_value->payload, 1, -1);
}
return $new_value->payload;
}

View file

@ -44,6 +44,11 @@ class CreateTicketSettings extends SettingsMigration
return null;
}
// remove the quotes from the string
if (substr($new_value->payload, 0, 1) === '"' && substr($new_value->payload, -1) === '"') {
return substr($new_value->payload, 1, -1);
}
return $new_value->payload;
}