Skip to content

Commit d296d1d

Browse files
Merge branch 'AC-9831' into cia-2.4.7-beta3-develop-bugfix-11302023
2 parents fab3b6b + 6da6430 commit d296d1d

File tree

4 files changed

+7
-19
lines changed

4 files changed

+7
-19
lines changed

app/code/Magento/Email/Model/Template/Filter.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ class Filter extends Template
8181
*/
8282
protected $_modifiers = ['nl2br' => ''];
8383

84-
/**
85-
* @var string
86-
*/
87-
private const CACHE_KEY_PREFIX = "EMAIL_FILTER_";
88-
8984
/**
9085
* @var bool
9186
*/
@@ -414,10 +409,6 @@ public function blockDirective($construction)
414409
$skipParams = ['class', 'id', 'output'];
415410
$blockParameters = $this->getParameters($construction[2]);
416411

417-
if (isset($blockParameters['cache_key'])) {
418-
$blockParameters['cache_key'] = self::CACHE_KEY_PREFIX . $blockParameters['cache_key'];
419-
}
420-
421412
$block = null;
422413

423414
if (isset($blockParameters['class'])) {

lib/internal/Magento/Framework/Filter/Template/Tokenizer/Parameter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function tokenize()
2525
}
2626

2727
if ($this->char() !== '=') {
28-
$parameterName .= strtolower($this->char());
28+
$parameterName .= $this->char();
2929
} else {
3030
$parameters[$parameterName] = $this->getValue();
3131
$parameterName = '';

lib/internal/Magento/Framework/View/Element/AbstractBlock.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Magento\Framework\Cache\LockGuardedCacheLoader;
1313
use Magento\Framework\Config\ConfigOptionsListConstants;
1414
use Magento\Framework\DataObject\IdentityInterface;
15+
use Magento\Framework\Exception\RuntimeException;
1516

1617
/**
1718
* Base class for all blocks.
@@ -1043,17 +1044,13 @@ public function getCacheKeyInfo()
10431044
* Get Key for caching block content
10441045
*
10451046
* @return string
1046-
* @throws \Magento\Framework\Exception\LocalizedException
1047+
* @throws RuntimeException
10471048
*/
10481049
public function getCacheKey()
10491050
{
10501051
if ($this->hasData('cache_key')) {
10511052
if (preg_match('/[^a-z0-9\-\_]/i', $this->getData('cache_key'))) {
1052-
throw new \Magento\Framework\Exception\LocalizedException(
1053-
__(
1054-
'Please enter cache key with only alphanumeric or hash string.'
1055-
)
1056-
);
1053+
throw new RuntimeException(__('Please enter cache key with only alphanumeric or hash string.'));
10571054
}
10581055

10591056
return static::CUSTOM_CACHE_KEY_PREFIX . $this->getData('cache_key');

lib/internal/Magento/Framework/View/Test/Unit/Element/AbstractBlockTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Magento\Framework\Config\View;
1616
use Magento\Framework\Escaper;
1717
use Magento\Framework\Event\ManagerInterface as EventManagerInterface;
18-
use Magento\Framework\Exception\LocalizedException;
18+
use Magento\Framework\Exception\RuntimeException;
1919
use Magento\Framework\ObjectManagerInterface;
2020
use Magento\Framework\Session\SessionManagerInterface;
2121
use Magento\Framework\Session\SidResolverInterface;
@@ -246,13 +246,13 @@ public function testGetCacheKey()
246246
/**
247247
* Test for invalid cacheKey name
248248
* @return void
249-
* @throws LocalizedException
249+
* @throws RuntimeException
250250
*/
251251
public function testGetCacheKeyFail(): void
252252
{
253253
$cacheKey = "test&''Key";
254254
$this->block->setData('cache_key', $cacheKey);
255-
$this->expectException(LocalizedException::class);
255+
$this->expectException(RuntimeException::class);
256256
$this->expectExceptionMessage((string)__('Please enter cache key with only alphanumeric or hash string.'));
257257
$this->block->getCacheKey();
258258
}

0 commit comments

Comments
 (0)