Skip to content

Commit fde309d

Browse files
committed
AC-1981: Widget parameters validation
* Added fix for widget parameters
1 parent 255bbee commit fde309d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

app/code/Magento/Widget/Model/Widget/Instance.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,6 @@ private function getWidgetTemplatesFromConfig(
628628
* @return string
629629
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
630630
* @SuppressWarnings(PHPMD.NPathComplexity)
631-
* @throws LocalizedException
632631
*/
633632
public function generateLayoutUpdateXml($container, $templatePath = '')
634633
{
@@ -644,12 +643,8 @@ public function generateLayoutUpdateXml($container, $templatePath = '')
644643
if (!$this->getId() && !$this->isCompleteToCreate() || $templatePath && !is_readable($templateFilename)) {
645644
return '';
646645
}
647-
try {
648-
$this->validateWidgetParameters($container);
649-
} catch (LocalizedException $e) {
650-
throw new LocalizedException(__('Layout update is invalid'));
651-
}
652646
$parameters = $this->getWidgetParameters();
647+
$this->validateWidgetParameters($container);
653648
$xml = '<body><referenceContainer name="' . $container . '">';
654649
$template = '';
655650
if (isset($parameters['template'])) {

0 commit comments

Comments
 (0)