Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit c48e949

Browse files
committed
Return early if there are no messages
1 parent cc1d5dc commit c48e949

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Helper/FlashMessenger.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ protected function renderMessages(
143143
array $classes = [],
144144
$autoEscape = null
145145
) {
146+
if (empty($messages)) {
147+
return '';
148+
}
149+
146150
// Prepare classes for opening tag
147151
if (empty($classes)) {
148152
if (isset($this->classMessages[$namespace])) {

0 commit comments

Comments
 (0)