Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix null pointer
Sander Dorigo3abba71f8d33
diff --git a/app/Listeners/Model/TransactionGroup/ProcessesNewTransactionGroup.php b/app/Listeners/Model/TransactionGroup/ProcessesNewTransactionGroup.phpindex 718a2c82d4..6bea4914d4 100644--- a/app/Listeners/Model/TransactionGroup/ProcessesNewTransactionGroup.php+++ b/app/Listeners/Model/TransactionGroup/ProcessesNewTransactionGroup.php@@ -68,7 +68,7 @@ class ProcessesNewTransactionGroup implements ShouldQueue}Log::debug(sprintf('Will (joined with group #%d) collect all open transaction groups and process them.', $groupId));$repository = app(JournalRepositoryInterface::class);- $set = $collection->merge($repository->getUncompletedJournals());+ $set = $collection->merge($repository->getAllUncompletedJournals());if (0 === $set->count()) {Log::debug('Set is empty, never mind.');@@ -141,11 +141,13 @@ class ProcessesNewTransactionGroup implements ShouldQueueprivate function removePeriodStatistics(Collection $set): void{+ if(auth()->check()) {Log::debug('Always remove period statistics');/** @var PeriodStatisticRepositoryInterface $repository */$repository = app(PeriodStatisticRepositoryInterface::class);$repository->deleteStatisticsForCollection($set);+ }}private function fireWebhooks(Collection $set): voiddiff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.phpindex ddc065aa98..8b011b144d 100644--- a/app/Repositories/Journal/JournalRepository.php+++ b/app/Repositories/Journal/JournalRepository.php@@ -255,13 +255,17 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfac#[Override]public function getUncompletedJournals(): Collection{- return $this->userGroup- ->transactionJournals()- ->where('completed', false)- ->get(['transaction_journals.*'])+ return $this->userGroup->transactionJournals()->where('completed', false)->get(['transaction_journals.*']);}+ #[Override]+ public function getAllUncompletedJournals(): Collection+ {+ return TransactionJournal::where('completed', false)->get(['transaction_journals.*'])+ ;+ }+#[Override]public function markAsCompleted(Collection $set): void{diff --git a/app/Repositories/Journal/JournalRepositoryInterface.php b/app/Repositories/Journal/JournalRepositoryInterface.phpindex 67533f609c..ef516ec407 100644--- a/app/Repositories/Journal/JournalRepositoryInterface.php+++ b/app/Repositories/Journal/JournalRepositoryInterface.php@@ -53,6 +53,7 @@ interface JournalRepositoryInterfacepublic function destroyGroup(TransactionGroup $transactionGroup): void;public function getUncompletedJournals(): Collection;+ public function getAllUncompletedJournals(): Collection;public function markAsCompleted(Collection $set): void;diff --git a/composer.json b/composer.jsonindex 952f917b15..56f0ad12d6 100644--- a/composer.json+++ b/composer.json@@ -198,6 +198,9 @@"composer/package-versions-deprecated": true,"phpstan/extension-installer": true,"php-http/discovery": true+ },+ "platform": {+ "php": "8.4"}}}diff --git a/composer.lock b/composer.lockindex c567490bd1..19ffe2097c 100644--- a/composer.lock+++ b/composer.lock@@ -4,7 +4,7 @@"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies","This file is @generated automatically"],- "content-hash": "1de93b568d1a9a4847285e5b5bc6695b",+ "content-hash": "72404106289a876b0046dceacbaccf24","packages": [{"name": "bacon/bacon-qr-code",@@ -10683,16 +10683,16 @@},{"name": "iamcal/sql-parser",- "version": "v0.6",+ "version": "v0.7","source": {"type": "git","url": "https://github.com/iamcal/SQLParser.git",- "reference": "947083e2dca211a6f12fb1beb67a01e387de9b62"+ "reference": "610392f38de49a44dab08dc1659960a29874c4b8"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/iamcal/SQLParser/zipball/947083e2dca211a6f12fb1beb67a01e387de9b62",- "reference": "947083e2dca211a6f12fb1beb67a01e387de9b62",+ "url": "https://api.github.com/repos/iamcal/SQLParser/zipball/610392f38de49a44dab08dc1659960a29874c4b8",+ "reference": "610392f38de49a44dab08dc1659960a29874c4b8","shasum": ""},"require-dev": {@@ -10718,27 +10718,27 @@"description": "MySQL schema parser","support": {"issues": "https://github.com/iamcal/SQLParser/issues",- "source": "https://github.com/iamcal/SQLParser/tree/v0.6"+ "source": "https://github.com/iamcal/SQLParser/tree/v0.7"},- "time": "2025-03-17T16:59:46+00:00"+ "time": "2026-01-28T22:20:33+00:00"},{"name": "larastan/larastan",- "version": "v3.9.1",+ "version": "v3.9.2","source": {"type": "git","url": "https://github.com/larastan/larastan.git",- "reference": "4b92d9627f779fd32bdc16f53f8ce88c50446ff5"+ "reference": "2e9ed291bdc1969e7f270fb33c9cdf3c912daeb2"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/larastan/larastan/zipball/4b92d9627f779fd32bdc16f53f8ce88c50446ff5",- "reference": "4b92d9627f779fd32bdc16f53f8ce88c50446ff5",+ "url": "https://api.github.com/repos/larastan/larastan/zipball/2e9ed291bdc1969e7f270fb33c9cdf3c912daeb2",+ "reference": "2e9ed291bdc1969e7f270fb33c9cdf3c912daeb2","shasum": ""},"require": {"ext-json": "*",- "iamcal/sql-parser": "^0.6.0",+ "iamcal/sql-parser": "^0.7.0","illuminate/console": "^11.44.2 || ^12.4.1","illuminate/container": "^11.44.2 || ^12.4.1","illuminate/contracts": "^11.44.2 || ^12.4.1",@@ -10802,7 +10802,7 @@],"support": {"issues": "https://github.com/larastan/larastan/issues",- "source": "https://github.com/larastan/larastan/tree/v3.9.1"+ "source": "https://github.com/larastan/larastan/tree/v3.9.2"},"funding": [{@@ -10810,7 +10810,7 @@"type": "github"}],- "time": "2026-01-21T09:15:17+00:00"+ "time": "2026-01-30T15:16:32+00:00"},{"name": "laravel-json-api/testing",@@ -11651,16 +11651,16 @@},{"name": "phpunit/php-file-iterator",- "version": "6.0.0",+ "version": "6.0.1","source": {"type": "git","url": "https://github.com/sebastianbergmann/php-file-iterator.git",- "reference": "961bc913d42fe24a257bfff826a5068079ac7782"+ "reference": "3d1cd096ef6bea4bf2762ba586e35dbd317cbfd5"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/961bc913d42fe24a257bfff826a5068079ac7782",- "reference": "961bc913d42fe24a257bfff826a5068079ac7782",+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3d1cd096ef6bea4bf2762ba586e35dbd317cbfd5",+ "reference": "3d1cd096ef6bea4bf2762ba586e35dbd317cbfd5","shasum": ""},"require": {@@ -11700,15 +11700,27 @@"support": {"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues","security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy",- "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/6.0.0"+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/6.0.1"},"funding": [{"url": "https://github.com/sebastianbergmann","type": "github"+ },+ {+ "url": "https://liberapay.com/sebastianbergmann",+ "type": "liberapay"+ },+ {+ "url": "https://thanks.dev/u/gh/sebastianbergmann",+ "type": "thanks_dev"+ },+ {+ "url": "https://tidelift.com/funding/github/packagist/phpunit/php-file-iterator",+ "type": "tidelift"}],- "time": "2025-02-07T04:58:37+00:00"+ "time": "2026-02-02T14:04:18+00:00"},{"name": "phpunit/php-invoker",@@ -13199,5 +13211,8 @@"ext-xmlwriter": "*"},"platform-dev": {},+ "platform-overrides": {+ "php": "8.4"+ },"plugin-api-version": "2.9.0"}