mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix annoying index error.
This commit is contained in:
parent
76954f4a13
commit
67ef185a72
12
.ci/php-cs-fixer/composer.lock
generated
12
.ci/php-cs-fixer/composer.lock
generated
@ -226,16 +226,16 @@
|
||||
},
|
||||
{
|
||||
"name": "friendsofphp/php-cs-fixer",
|
||||
"version": "v3.38.0",
|
||||
"version": "v3.38.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
|
||||
"reference": "7e6070026e76aa09d77a47519625c86593fb8e31"
|
||||
"reference": "d872cdd543797ade030aaa307c0a4954a712e081"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/7e6070026e76aa09d77a47519625c86593fb8e31",
|
||||
"reference": "7e6070026e76aa09d77a47519625c86593fb8e31",
|
||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/d872cdd543797ade030aaa307c0a4954a712e081",
|
||||
"reference": "d872cdd543797ade030aaa307c0a4954a712e081",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -307,7 +307,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
|
||||
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.38.0"
|
||||
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.38.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -315,7 +315,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-11-07T08:44:54+00:00"
|
||||
"time": "2023-11-14T00:19:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
|
@ -218,7 +218,7 @@ class CreateController extends Controller
|
||||
];
|
||||
|
||||
// restore actions and triggers from old input:
|
||||
if (null !== $request->old()) {
|
||||
if (null !== $request->old() && count($request->old()) > 0) {
|
||||
$oldTriggers = $this->getPreviousTriggers($request);
|
||||
$oldActions = $this->getPreviousActions($request);
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ trait ModelInformation
|
||||
*/
|
||||
private function getTriggersForJournal(TransactionJournal $journal): array
|
||||
{
|
||||
// See reference nr. 40
|
||||
// TODO duplicated code.
|
||||
$operators = config('search.operators');
|
||||
$triggers = [];
|
||||
foreach ($operators as $key => $operator) {
|
||||
@ -250,16 +250,14 @@ trait ModelInformation
|
||||
|
||||
foreach ($journalTriggers as $ii => $trigger) {
|
||||
try {
|
||||
$string = view(
|
||||
'rules.partials.trigger',
|
||||
[
|
||||
'oldTrigger' => $trigger,
|
||||
'oldValue' => $values[$index],
|
||||
'oldChecked' => false,
|
||||
'count' => $ii + 1,
|
||||
'triggers' => $triggers,
|
||||
]
|
||||
)->render();
|
||||
$renderInfo = [
|
||||
'oldTrigger' => $trigger,
|
||||
'oldValue' => $values[$ii],
|
||||
'oldChecked' => false,
|
||||
'count' => $ii + 1,
|
||||
'triggers' => $triggers,
|
||||
];
|
||||
$string = view('rules.partials.trigger', $renderInfo)->render();
|
||||
} catch (Throwable $e) {
|
||||
app('log')->debug(sprintf('Throwable was thrown in getTriggersForJournal(): %s', $e->getMessage()));
|
||||
app('log')->debug($e->getTraceAsString());
|
||||
@ -269,7 +267,6 @@ trait ModelInformation
|
||||
$result[] = $string;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user