🆙 More fixes 🆙

This commit is contained in:
Remco
2026-01-20 17:26:24 +01:00
parent 00bda515fa
commit 1fa6b4dc60
2 changed files with 14 additions and 3 deletions
@@ -154,17 +154,22 @@ class EditUser extends EditRecord
{ {
$user->currencies->each(function (UserCurrency $currency) use ($data, $user): void { $user->currencies->each(function (UserCurrency $currency) use ($data, $user): void {
$updatedCurrencyAmount = $data["currency_{$currency->type}"] ?? $currency->amount; $updatedCurrencyAmount = $data["currency_{$currency->type}"] ?? $currency->amount;
$currencyType = match ($currency->type) { if (! is_numeric($updatedCurrencyAmount)) {
return;
}
$updatedCurrencyAmount = (int) $updatedCurrencyAmount;
$currencyType = match ((int) $currency->type) {
0 => 'duckets', 0 => 'duckets',
5 => 'diamonds', 5 => 'diamonds',
101 => 'points', 101 => 'points',
default => null,
}; };
if ($updatedCurrencyAmount == $currency->amount) { if ($currencyType === null || $updatedCurrencyAmount === (int) $currency->amount) {
return; return;
} }
app(SendCurrency::class)->execute($user, $currencyType, -$currency->amount + (int) $updatedCurrencyAmount); app(SendCurrency::class)->execute($user, $currencyType, -((int) $currency->amount) + $updatedCurrencyAmount);
}); });
} }
+6
View File
@@ -76,3 +76,9 @@
[2026-01-20 16:11:03] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd [2026-01-20 16:11:03] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd
[2026-01-20 16:13:12] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd [2026-01-20 16:13:12] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd
[2026-01-20 16:14:07] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd [2026-01-20 16:14:07] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd
[2026-01-20 16:17:47] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd
[2026-01-20 16:25:49] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 151552 bytes) {"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Allowed memory size of 134217728 bytes exhausted (tried to allocate 151552 bytes) at phar://C:/Github/Epicnabbo-Catalogus-2025FullPack-Updated-Daily/Updated_Cms/vendor/phpstan/phpstan/phpstan.phar/src/File/FileReader.php:16)
[stacktrace]
#0 {main}
"}
[2026-01-20 16:26:06] production.ERROR: RCON connection failed: Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd