From 82b358f69d43fcc0337bacf9420139de39b454ae Mon Sep 17 00:00:00 2001 From: Philipp Lang Date: Thu, 29 Oct 2020 21:33:43 +0000 Subject: [PATCH] Return no image if given value is not numeric --- formwidgets/Responsiveimage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formwidgets/Responsiveimage.php b/formwidgets/Responsiveimage.php index 43bd93b..4129c60 100644 --- a/formwidgets/Responsiveimage.php +++ b/formwidgets/Responsiveimage.php @@ -79,7 +79,7 @@ class Responsiveimage extends FormWidgetBase : 'null'; $this->vars['minWidth'] = $this->minWidth ?: '0'; $this->vars['name'] = $this->formField->getName(); - $this->vars['value'] = $this->getLoadValue() ?: 'null'; + $this->vars['value'] = is_numeric($this->getLoadValue()) ? $this->getLoadValue() : 'null'; $this->vars['meta'] = $this->getLoadValue() ? $this->vueParam(app(UploadStorage::class)->getFileData($this->getLoadValue())) : 'null';