nystudio107 / craft-units

Units is a plugin that can convert between any units of measure, and comes with a Field for content authors to use
https://nystudio107.com/
MIT License
9 stars 2 forks source link

$defaultMax Setting Error #45

Closed samlising closed 2 years ago

samlising commented 2 years ago

Describe the bug

The following error comes up when I installed Units v4.0 with Craft 4.3.1: Typed property nystudio107\units\models\Settings::$defaultMax must not be accessed before initialization

I believe it is because in the Settings.php file $defaultMax has no value set. I set this value to:

public int|null|float $defaultMax = null;

This solved the error for me.

khalwat commented 2 years ago

Already fixed (just not tagged for release yet):

https://github.com/nystudio107/craft-units/issues/41

hascoulijn commented 1 year ago

Is the fix for this issue released yet? I'm still getting this error on Craft 4.4.7.1 with Units 4.0.0.

khalwat commented 1 year ago

Released as 4.0.1 -> https://github.com/nystudio107/craft-units/releases/tag/4.0.1