You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Field::normalizeValue method has an optional 2nd parameter: ElementInterface, but the Number field's override of normalizeValue calls the isValueEmpty method, which requires an ElementInterface, which can resul in a TypeError like the following:
TypeError: Argument 2 passed to craft\base\Field::isValueEmpty() must implement interface craft\base\ElementInterface, null given, called in /usr/share/nginx/craft/vendor/craftcms/cms/src/fields/Number.php on line 152 and defined in /usr/share/nginx/craft/vendor/craftcms/cms/src/base/Field.php:311
Stack trace:
#0 /usr/share/nginx/craft/vendor/craftcms/cms/src/fields/Number.php(152): craft\base\Field->isValueEmpty('24670.00', NULL)
#1 /packages/craft-csv-import/src/importers/ElementImporter.php(182): craft\fields\Number->normalizeValue('24670.00')
...
The text was updated successfully, but these errors were encountered:
The
Field::normalizeValue
method has an optional 2nd parameter:ElementInterface
, but theNumber
field's override ofnormalizeValue
calls theisValueEmpty
method, which requires anElementInterface
, which can resul in aTypeError
like the following:The text was updated successfully, but these errors were encountered: