Add exception code for bad values.

This commit is contained in:
James Cole
2022-05-04 20:32:51 +02:00
parent 3d1233314a
commit 610bc9f4bc
2 changed files with 10 additions and 4 deletions

View File

@@ -614,10 +614,9 @@ class OperatorQuerySearch implements SearchInterface
// amount
//
case 'amount_is':
// strip comma's, make dots.
Log::debug(sprintf('Original value "%s"', $value));
$value = str_replace(',', '.', (string) $value);
$amount = app('steam')->positive($value);
Log::debug(sprintf('Set "%s" using collector with value "%s"', $operator, $amount));
$this->collector->amountIs($amount);