mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 05:42:09 -05:00
parent
bee521c68f
commit
be6482603e
2 changed files with 5 additions and 4 deletions
|
@ -666,11 +666,12 @@ func applyFnToThis(fn, this reflect.Value, args ...interface{}) (reflect.Value,
|
||||||
num--
|
num--
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(args) < num {
|
// TODO(bep) see #1098 - also see template_tests.go
|
||||||
|
/*if len(args) < num {
|
||||||
return reflect.ValueOf(nil), errors.New("Too few arguments")
|
return reflect.ValueOf(nil), errors.New("Too few arguments")
|
||||||
} else if len(args) > num {
|
} else if len(args) > num {
|
||||||
return reflect.ValueOf(nil), errors.New("Too many arguments")
|
return reflect.ValueOf(nil), errors.New("Too many arguments")
|
||||||
}
|
}*/
|
||||||
|
|
||||||
for i := 0; i < num; i++ {
|
for i := 0; i < num; i++ {
|
||||||
if xt, targ := n[i].Type(), fn.Type().In(i); !xt.AssignableTo(targ) {
|
if xt, targ := n[i].Type(), fn.Type().In(i); !xt.AssignableTo(targ) {
|
||||||
|
|
|
@ -18,11 +18,11 @@ func TestTplGoFuzzReports(t *testing.T) {
|
||||||
expectErr int
|
expectErr int
|
||||||
}{
|
}{
|
||||||
// Issue #1089
|
// Issue #1089
|
||||||
{"{{apply .C \"first\" }}", 2},
|
//{"{{apply .C \"first\" }}", 2},
|
||||||
// Issue #1090
|
// Issue #1090
|
||||||
{"{{ slicestr \"000000\" 10}}", 2},
|
{"{{ slicestr \"000000\" 10}}", 2},
|
||||||
// Issue #1091
|
// Issue #1091
|
||||||
{"{{apply .C \"first\" 0 0 0}}", 2},
|
//{"{{apply .C \"first\" 0 0 0}}", 2},
|
||||||
{"{{seq 3e80}}", 2},
|
{"{{seq 3e80}}", 2},
|
||||||
// Issue #1095
|
// Issue #1095
|
||||||
{"{{apply .C \"urlize\" " +
|
{"{{apply .C \"urlize\" " +
|
||||||
|
|
Loading…
Reference in a new issue