mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 05:26:17 +00:00
Fix API error
This commit is contained in:
@@ -137,7 +137,9 @@ abstract class Controller extends BaseController
|
||||
if (null !== $value) {
|
||||
$bag->set($integer, (int)$value);
|
||||
}
|
||||
if (null === $value && 'limit' === $integer && auth()->check()) {
|
||||
if (null === $value &&
|
||||
'limit' === $integer && // @phpstan-ignore-line
|
||||
auth()->check()) {
|
||||
// set default for user:
|
||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
||||
$bag->set($integer, $pageSize);
|
||||
|
||||
@@ -73,9 +73,7 @@ class UpdateRequest extends FormRequest
|
||||
if (null !== $reps) {
|
||||
$return['repetitions'] = $reps;
|
||||
}
|
||||
if (null !== $transactions) {
|
||||
$return['transactions'] = $transactions;
|
||||
}
|
||||
$return['transactions'] = $transactions;
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ class UpdateRequest extends FormRequest
|
||||
return $return;
|
||||
}
|
||||
|
||||
/** @var array $transaction */
|
||||
/** @var array|null $transaction */
|
||||
foreach ($transactions as $transaction) {
|
||||
if (!is_array($transaction)) {
|
||||
throw new FireflyException('Invalid data submitted: transaction is not array.');
|
||||
|
||||
Reference in New Issue
Block a user