fix(regression): custom less validation check

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
This commit is contained in:
Sami Mazouz 2023-03-06 15:24:03 +01:00
parent 3af0481f30
commit 3f864bafc8
No known key found for this signature in database

View File

@ -63,7 +63,7 @@ class ValidateCustomLess
}
// Restrict what features can be used in custom LESS
if (preg_match('/@import|data-uri\s*\(/i', $event->settings['custom_less'])) {
if (isset($event->settings['custom_less']) && preg_match('/@import|data-uri\s*\(/i', $event->settings['custom_less'])) {
$translator = $this->container->make(TranslatorInterface::class);
throw new ValidationException([