Skip to content

Commit 8a17a99

Browse files
chmstlaoneobembelimen
authored
[5.3] Remove unsed variable messages from enqueue messages (joomla#42948)
* Remove unsed variable * fix as reuested * Add a comment --------- Co-authored-by: Allon Moritz <[email protected]> Co-authored-by: Benjamin Trenkle <[email protected]>
1 parent 6af88f5 commit 8a17a99

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

libraries/src/Application/CMSApplication.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,8 @@ public function enqueueMessage($msg, $type = self::MSG_INFO)
249249
'type' => $inputFilter->clean(strtolower($type), 'cmd'),
250250
];
251251

252-
// For empty queue, if messages exists in the session, enqueue them first.
253-
$messages = $this->getMessageQueue();
254-
255-
if (!\in_array($message, $this->messageQueue)) {
252+
// Get the messages of the session and add the new message if it is not already in the queue.
253+
if (!\in_array($message, $this->getMessageQueue())) {
256254
// Enqueue the message.
257255
$this->messageQueue[] = $message;
258256
}

0 commit comments

Comments
 (0)