3
0

Prevent server crash when accessing field w/o initialized options

This commit is contained in:
Denis Arh
2022-11-09 16:20:21 +01:00
parent e551b735be
commit adf7b17465
+4
View File
@@ -450,6 +450,10 @@ func (f ModuleField) setOptionKey(v interface{}, kk ...string) {
}
func (f ModuleField) getOptionKey(kk ...string) interface{} {
if len(f.Options) == 0 {
return nil
}
opt := f.Options
for _, k := range kk[0 : len(kk)-1] {