File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
lib/internal/Magento/Framework/View Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,10 @@ public function getExcludes($contentType)
162
162
private function getMinificationExcludeValues ($ key )
163
163
{
164
164
$ configValues = $ this ->scopeConfig ->getValue ($ key , $ this ->scope ) ?? [];
165
-
165
+ //compatibility fix for type change from string to array
166
+ if (!is_array ($ configValues )) {
167
+ $ configValues = [$ configValues => $ configValues ];
168
+ }
166
169
return array_values ($ configValues );
167
170
}
168
171
}
Original file line number Diff line number Diff line change @@ -195,6 +195,8 @@ public function isMinifiedFilenameDataProvider()
195
195
}
196
196
197
197
/**
198
+ * Test dev/js/minify_exclude system value as array
199
+ *
198
200
* @return void
199
201
*/
200
202
public function testGetExcludes ()
@@ -213,4 +215,23 @@ public function testGetExcludes()
213
215
/** check cache: */
214
216
$ this ->assertEquals ($ expected , $ this ->minification ->getExcludes ('js ' ));
215
217
}
218
+
219
+ /**
220
+ * Test dev/js/minify_exclude system value backward compatibility when value was a string
221
+ *
222
+ * @return void
223
+ */
224
+ public function testGetExcludesTinyMceAsString ()
225
+ {
226
+ $ this ->scopeConfigMock
227
+ ->expects ($ this ->once ())
228
+ ->method ('getValue ' )
229
+ ->with ('dev/js/minify_exclude ' )
230
+ ->willReturn ('/tiny_mce/ ' );
231
+
232
+ $ expected = ['/tiny_mce/ ' ];
233
+ $ this ->assertEquals ($ expected , $ this ->minification ->getExcludes ('js ' ));
234
+ /** check cache: */
235
+ $ this ->assertEquals ($ expected , $ this ->minification ->getExcludes ('js ' ));
236
+ }
216
237
}
You can’t perform that action at this time.
0 commit comments