diff --git a/Updated_Cms/app/Filament/Resources/User/Users/Pages/EditUser.php b/Updated_Cms/app/Filament/Resources/User/Users/Pages/EditUser.php index c5ab9fb05b..dd9fccbbdc 100644 --- a/Updated_Cms/app/Filament/Resources/User/Users/Pages/EditUser.php +++ b/Updated_Cms/app/Filament/Resources/User/Users/Pages/EditUser.php @@ -154,17 +154,22 @@ class EditUser extends EditRecord { $user->currencies->each(function (UserCurrency $currency) use ($data, $user): void { $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', 5 => 'diamonds', 101 => 'points', + default => null, }; - if ($updatedCurrencyAmount == $currency->amount) { + if ($currencyType === null || $updatedCurrencyAmount === (int) $currency->amount) { return; } - app(SendCurrency::class)->execute($user, $currencyType, -$currency->amount + (int) $updatedCurrencyAmount); + app(SendCurrency::class)->execute($user, $currencyType, -((int) $currency->amount) + $updatedCurrencyAmount); }); } diff --git a/Updated_Cms/storage/logs/laravel.log b/Updated_Cms/storage/logs/laravel.log index 20a13d6c44..ddc9b5792d 100644 --- a/Updated_Cms/storage/logs/laravel.log +++ b/Updated_Cms/storage/logs/laravel.log @@ -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: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: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