Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Make sure notes always have a value, even when null #3823
James Coled97fd73ce56c
diff --git a/resources/views/v1/accounts/show.twig b/resources/views/v1/accounts/show.twigindex 9744a83cdf..b4dd5f18a5 100644--- a/resources/views/v1/accounts/show.twig+++ b/resources/views/v1/accounts/show.twig@@ -122,7 +122,7 @@<h3 class="box-title">{{ 'notes'|_ }}</h3></div><div class="box-body">- {{ account.notes.first.text|markdown }}+ {{ account.notes.first.text|default('')|markdown }}</div></div></div>diff --git a/resources/views/v1/bills/show.twig b/resources/views/v1/bills/show.twigindex 7efc81111f..594ac11a26 100644--- a/resources/views/v1/bills/show.twig+++ b/resources/views/v1/bills/show.twig@@ -110,7 +110,7 @@<h3 class="box-title">{{ 'notes'|_ }}</h3></div><div class="box-body">- {{ object.data.notes|markdown }}+ {{ object.data.notes|default('')|markdown }}</div></div>{% endif %}diff --git a/resources/views/v1/list/attachments.twig b/resources/views/v1/list/attachments.twigindex a287e31911..271b9a0371 100644--- a/resources/views/v1/list/attachments.twig+++ b/resources/views/v1/list/attachments.twig@@ -28,7 +28,7 @@</a>({{ attachment.size|filesize }}){% if null != attachment.notes and '' != attachment.notes %}- {{ attachment.notes|markdown }}+ {{ attachment.notes|default('')|markdown }}{% endif %}{% endif %}{% if not attachment.file_exists %}diff --git a/resources/views/v1/piggy-banks/show.twig b/resources/views/v1/piggy-banks/show.twigindex 100e99feda..7401539b6e 100644--- a/resources/views/v1/piggy-banks/show.twig+++ b/resources/views/v1/piggy-banks/show.twig@@ -111,7 +111,7 @@<div class="box-header with-border"><h3 class="box-title">{{ trans('form.notes') }}</h3></div>- <div class="box-body markdown">{{ piggy.notes|markdown }}+ <div class="box-body markdown">{{ piggy.notes|default('')|markdown }}</div></div>diff --git a/resources/views/v1/rules/index.twig b/resources/views/v1/rules/index.twigindex 0bb763b408..0298a2fc89 100644--- a/resources/views/v1/rules/index.twig+++ b/resources/views/v1/rules/index.twig@@ -115,7 +115,7 @@{% if not rule.active %}class="text-muted"{% endif %}- ><br/>{{ rule.description|markdown }}</small>+ ><br/>{{ rule.description|default('')|markdown }}</small>{% endif %}<small><br />{% if rule.strict %}<span class="text-danger">{{ 'rule_is_strict'|_ }}</span>{% else %}<span class="text-success">{{ 'rule_is_not_strict'|_ }}</span>{% endif %}</small></td>diff --git a/resources/views/v1/transactions/show.twig b/resources/views/v1/transactions/show.twigindex ffddb9f9a9..70fbf99cd2 100644--- a/resources/views/v1/transactions/show.twig+++ b/resources/views/v1/transactions/show.twig@@ -311,7 +311,7 @@{% if null != journal.notes and '' != journal.notes %}<tr><td>{{ trans('list.notes') }}</td>- <td class="markdown">{{ journal.notes|markdown }}</td>+ <td class="markdown">{{ journal.notes|default('')|markdown }}</td></tr>{% endif %}{% if journalHasMeta(journal.transaction_journal_id, 'recurring_total') and journalHasMeta(journal.transaction_journal_id, 'recurring_count') %}