Catch not numeric numbers

This commit is contained in:
Sander Dorigo
2026-03-04 15:25:32 +01:00
parent 0ad4db8a71
commit 49d8a3c32e

View File

@@ -143,7 +143,7 @@ final class AmountController extends Controller
/** @var Account $account */
foreach ($piggyBank->accounts as $account) {
$amount = (string) ($amounts[$account->id] ?? '0');
if ('' === $amount || 0 === bccomp($amount, '0')) {
if ('' === $amount || !is_numeric($amount) || 0 === bccomp($amount, '0')) {
continue;
}
if (-1 === bccomp($amount, '0')) {