8000 [Notifier][WebProfilerBundle] Ignore messages whose `getNotification`… · symfony/web-profiler-bundle@0ea68fb · GitHub
[go: up one dir, main page]

Skip to content

Commit 0ea68fb

Browse files
MatTheCatfabpot
authored andcommitted
[Notifier][WebProfilerBundle] Ignore messages whose getNotification returns null
1 parent f649564 commit 0ea68fb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Resources/views/Collector/notifier.html.twig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,24 +114,24 @@
114114
<span class="label">Subject</span>
115115
<h2 class="m-t-10">{{ message.getSubject() ?? '(empty)' }}</h2>
116116
</div>
117-
{% if message.getNotification is defined %}
117+
{% set notification = message.notification ?? null %}
118+
{% if notification %}
118119
<div class="card-block">
119120
<div class="row">
120121
<div class="col">
121122
<span class="label">Content</span>
122-
<pre class="prewrap">{{ message.getNotification().getContent() ?? '(empty)' }}</pre>
123+
<pre class="prewrap">{{ notification.getContent() ?? '(empty)' }}</pre>
123124
<span class="label">Importance</span>
124-
<pre class="prewrap">{{ message.getNotification().getImportance() }}</pre>
125+
<pre class="prewrap">{{ notification.getImportance() }}</pre>
125126
</div>
126127
</div>
127128
</div>
128129
{% endif %}
129130
<div class="card-block">
130131
<div class="sf-tabs sf-tabs-sm">
131-
{% if message.getNotification is defined %}
132+
{% if notification %}
132133
<div class="tab">
133134
<h3 class="tab-title">Notification</h3>
134-
{% set notification = event.message.getNotification() %}
135135
<div class="tab-content">
136136
<pre class="prewrap" style="max-height: 600px">
137137
{{- 'Subject: ' ~ notification.getSubject() }}<br/>

0 commit comments

Comments
 (0)
0