mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-18 18:44:16 +00:00
Fix various API 500 errors.
This commit is contained in:
@@ -79,6 +79,11 @@ class UniqueAccountNumber implements ValidationRule
|
||||
if (null === $this->expectedType) {
|
||||
return;
|
||||
}
|
||||
if(is_array($value)) {
|
||||
$fail('validation.generic_invalid')->translate();
|
||||
return;
|
||||
}
|
||||
$value = (string) $value;
|
||||
$maxCounts = $this->getMaxOccurrences();
|
||||
|
||||
foreach ($maxCounts as $type => $max) {
|
||||
|
@@ -94,6 +94,10 @@ class UniqueIban implements ValidationRule
|
||||
if (0 === count($this->expectedTypes)) {
|
||||
return true;
|
||||
}
|
||||
if(is_array($value)) {
|
||||
return false;
|
||||
}
|
||||
$value = (string) $value;
|
||||
$maxCounts = $this->getMaxOccurrences();
|
||||
|
||||
foreach ($maxCounts as $type => $max) {
|
||||
|
Reference in New Issue
Block a user