File tree Expand file tree Collapse file tree 4 files changed +7
-19
lines changed
app/code/Magento/Email/Model/Template
lib/internal/Magento/Framework
Filter/Template/Tokenizer Expand file tree Collapse file tree 4 files changed +7
-19
lines changed Original file line number Diff line number Diff 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 ' ])) {
Original file line number Diff line number Diff 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 = '' ;
Original file line number Diff line number Diff line change 1212use Magento \Framework \Cache \LockGuardedCacheLoader ;
1313use Magento \Framework \Config \ConfigOptionsListConstants ;
1414use 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 ' );
Original file line number Diff line number Diff line change 1515use Magento \Framework \Config \View ;
1616use Magento \Framework \Escaper ;
1717use Magento \Framework \Event \ManagerInterface as EventManagerInterface ;
18- use Magento \Framework \Exception \LocalizedException ;
18+ use Magento \Framework \Exception \RuntimeException ;
1919use Magento \Framework \ObjectManagerInterface ;
2020use Magento \Framework \Session \SessionManagerInterface ;
2121use 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 }
You can’t perform that action at this time.
0 commit comments