Skip to content

Commit

Permalink
fix number element type casting
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisGalliano committed Feb 7, 2020
1 parent ac6df39 commit 5883be5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Forms/Elements/Input/Number/NumberInputElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function name(): string

public function handle(ParametersInterface $parameters): ElementValidationResultsCollectionInterface
{
$this->setValue($parameters->has($this->name()) ? $parameters->require($this->name()) : 0.0);
$this->setValue($parameters->has($this->name()) ? (float)$parameters->require($this->name()) : 0.0);
$this->validationResult = $this->validator->validate($this);
return new ElementValidationResultsCollection(
new ElementValidationResult($this, $this->validationResult)
Expand Down

0 comments on commit 5883be5

Please sign in to comment.