Fix issues where data-variable was not initialized properly.

This commit is contained in:
James Cole
2018-07-25 07:11:04 +02:00
parent 7c950c3022
commit 7f4ecd40ce
11 changed files with 40 additions and 36 deletions

View File

@@ -229,8 +229,8 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
*/
public function storeLink(array $information, TransactionJournal $inward, TransactionJournal $outward): TransactionJournalLink
{
$linkType = $this->find((int)($information['link_type_id'] ?? 0));
if (null === $linkType->id) {
$linkType = $this->findNull((int)($information['link_type_id'] ?? 0));
if (null === $linkType) {
throw new FireflyException(sprintf('Link type #%d cannot be resolved to an actual link type', $information['link_type_id'] ?? 0));
}

View File

@@ -267,7 +267,6 @@ class TagRepository implements TagRepositoryInterface
public function tagCloud(?int $year): array
{
// Some vars
$return = [];
$tags = $this->getTagsInYear($year);
$max = $this->getMaxAmount($tags);
$min = $this->getMinAmount($tags);