Skip to content

Commit ec2aa11

Browse files
Merge pull request #7388 from magento-cia/2.4.5-bugfixes-011022
Bugfixes
2 parents 031fe7e + bf9c6a0 commit ec2aa11

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ class AddComment extends \Magento\Sales\Controller\Adminhtml\Order implements Ht
2020
*
2121
* @see _isAllowed()
2222
*/
23-
const ADMIN_RESOURCE = 'Magento_Sales::comment';
23+
public const ADMIN_RESOURCE = 'Magento_Sales::comment';
2424

2525
/**
2626
* ACL resource needed to send comment email notification
2727
*/
28-
const ADMIN_SALES_EMAIL_RESOURCE = 'Magento_Sales::emails';
28+
public const ADMIN_SALES_EMAIL_RESOURCE = 'Magento_Sales::emails';
2929

3030
/**
3131
* Add order comment action
@@ -52,13 +52,12 @@ public function execute()
5252
$notify = false;
5353
}
5454

55-
$history = $order->addStatusHistoryComment($data['comment'], $data['status']);
55+
$comment = trim(strip_tags($data['comment']));
56+
$history = $order->addStatusHistoryComment($comment, $data['status']);
5657
$history->setIsVisibleOnFront($visible);
5758
$history->setIsCustomerNotified($notify);
5859
$history->save();
5960

60-
$comment = trim(strip_tags($data['comment']));
61-
6261
$order->save();
6362
/** @var OrderCommentSender $orderCommentSender */
6463
$orderCommentSender = $this->_objectManager

app/code/Magento/Store/etc/config.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@
135135
<pht>pht</pht>
136136
<phar>phar</phar>
137137
<svg>svg</svg>
138+
<svgz>svgz</svgz>
138139
<xml>xml</xml>
139140
<xhtml>xhtml</xhtml>
140141
</protected_extensions>

0 commit comments

Comments
 (0)