File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
app/code/Magento/Swatches/Controller/Adminhtml/Product/Attribute/Plugin Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -24,15 +24,17 @@ class Save
2424 public function beforeDispatch (Attribute \Save $ subject , RequestInterface $ request )
2525 {
2626 $ data = $ request ->getPostValue ();
27- //Data is serialized to overcome issues caused by max_input_vars value if it's modification is unavailable.
28- //See subject controller code and comments for more info.
29- if (isset ($ data ['serialized_swatch_values ' ])
30- && in_array ($ data ['frontend_input ' ], ['swatch_visual ' , 'swatch_text ' ])
31- ) {
32- $ data ['serialized_options ' ] = $ data ['serialized_swatch_values ' ];
33- }
34- unset($ data ['serialized_swatch_values ' ]);
27+
3528 if (isset ($ data ['frontend_input ' ])) {
29+ //Data is serialized to overcome issues caused by max_input_vars value if it's modification is unavailable.
30+ //See subject controller code and comments for more info.
31+ if (isset ($ data ['serialized_swatch_values ' ])
32+ && in_array ($ data ['frontend_input ' ], ['swatch_visual ' , 'swatch_text ' ])
33+ ) {
34+ $ data ['serialized_options ' ] = $ data ['serialized_swatch_values ' ];
35+ unset($ data ['serialized_swatch_values ' ]);
36+ }
37+
3638 switch ($ data ['frontend_input ' ]) {
3739 case 'swatch_visual ' :
3840 $ data [Swatch::SWATCH_INPUT_TYPE_KEY ] = Swatch::SWATCH_INPUT_TYPE_VISUAL ;
You can’t perform that action at this time.
0 commit comments