summaryrefslogtreecommitdiffstats
path: root/pkg/exprparser
diff options
context:
space:
mode:
authorChristopherHX <christopher.homberger@web.de>2022-03-22 10:03:36 +0100
committerGitHub <noreply@github.com>2022-03-22 10:03:36 +0100
commit380bd581b1a56683a77b9eb017a72129f65251f8 (patch)
treeb5129852bdf0884688f6595fb8a9714b413f984d /pkg/exprparser
parentFix: tojson(null) == 'null' (#1068) (diff)
downloadforgejo-act-380bd581b1a56683a77b9eb017a72129f65251f8.tar.xz
forgejo-act-380bd581b1a56683a77b9eb017a72129f65251f8.zip
Fix: call of reflect.Value.Interface on zero Value (#1067)
panic: reflect: call of reflect.Value.Interface on zero Value Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Diffstat (limited to 'pkg/exprparser')
-rw-r--r--pkg/exprparser/interpreter.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/exprparser/interpreter.go b/pkg/exprparser/interpreter.go
index d313862..81eec07 100644
--- a/pkg/exprparser/interpreter.go
+++ b/pkg/exprparser/interpreter.go
@@ -195,7 +195,7 @@ func (impl *interperterImpl) evaluateArrayDeref(arrayDerefNode *actionlint.Array
return nil, err
}
- return reflect.ValueOf(left).Interface(), nil
+ return impl.getSafeValue(reflect.ValueOf(left)), nil
}
func (impl *interperterImpl) getPropertyValue(left reflect.Value, property string) (value interface{}, err error) {