Skip to content

Commit

Permalink
[5.3] Remove unsed variable messages from enqueue messages (#42948)
Browse files Browse the repository at this point in the history
* Remove unsed variable

* fix as reuested

* Add a comment

---------

Co-authored-by: Allon Moritz <allon.moritz@digital-peak.com>
Co-authored-by: Benjamin Trenkle <bembelimen@users.noreply.github.com>
3 people authored Feb 28, 2025
1 parent 6af88f5 commit 8a17a99
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libraries/src/Application/CMSApplication.php
Original file line number Diff line number Diff line change
@@ -249,10 +249,8 @@ public function enqueueMessage($msg, $type = self::MSG_INFO)
'type' => $inputFilter->clean(strtolower($type), 'cmd'),
];

// For empty queue, if messages exists in the session, enqueue them first.
$messages = $this->getMessageQueue();

if (!\in_array($message, $this->messageQueue)) {
// Get the messages of the session and add the new message if it is not already in the queue.
if (!\in_array($message, $this->getMessageQueue())) {
// Enqueue the message.
$this->messageQueue[] = $message;
}

0 comments on commit 8a17a99

Please sign in to comment.