Skip to content

Commit

Permalink
Fixed #2913
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed May 22, 2018
1 parent 48bc323 commit 56208ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG-v3.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes for Craft CMS 3.x

## Unreleased

### Fixed
- Fixed a PHP error that could occur when `craft\fields\Number::normalizeValue()` was called without passing an `$element` argument. ([#2913](https://github.com/craftcms/cms/issues/2913))

## 3.0.9 - 2018-05-22

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/fields/Number.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function normalizeValue($value, ElementInterface $element = null)
$value = Localization::normalizeNumber($value['value'], $value['locale']);
}

return $this->isValueEmpty($value, $element) ? null : $value;
return $value === '' ? null : $value;
}

/**
Expand Down

0 comments on commit 56208ed

Please sign in to comment.