From 2ae67e1b98644e2364d755d27d34a5b1ccd05a9c Mon Sep 17 00:00:00 2001 From: "Michael Albrecht (personal)" Date: Fri, 17 Jan 2025 09:57:10 +0100 Subject: [PATCH] [Numeric uses string values] Internally Pimcore uses string in the Numeric Editable - so we have to cast it --- src/EditableDialogBox/EditableItem/NumericItem.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/EditableDialogBox/EditableItem/NumericItem.php b/src/EditableDialogBox/EditableItem/NumericItem.php index 4605c66..4d97308 100644 --- a/src/EditableDialogBox/EditableItem/NumericItem.php +++ b/src/EditableDialogBox/EditableItem/NumericItem.php @@ -27,14 +27,14 @@ public function setDefaultValue(int $value): static throw new \InvalidArgumentException(\sprintf('Default value "%d" is out of bounds: [%d,%d]', $value, $this->min, $this->max)); } - return $this->addConfig('defaultValue', $value); + return $this->addConfig('defaultValue', (string) $value); } protected function getConfig(): array { return [ - 'minValue' => $this->min, - 'maxValue' => $this->max, + 'minValue' => (string) $this->min, + 'maxValue' => (string) $this->max, ]; } }