diff options
author | PhilAtWysdom <phil@wysdom.co.uk> | 2021-01-27 13:33:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-27 15:33:32 +0200 |
commit | af7f71207c3e9f62a873e3d4a0b57cdbfe121bb1 (patch) | |
tree | 9ecd16b8582016e51ec75f2c258361550bafc167 | |
parent | 2e90a256be87b7536e694c1d49978fcbc91685a7 (diff) | |
download | gitea-af7f71207c3e9f62a873e3d4a0b57cdbfe121bb1.tar.gz gitea-af7f71207c3e9f62a873e3d4a0b57cdbfe121bb1.zip |
Fix: url.Values map was not initialized (#14485)
Values map was not initialized, leading to error 500 on submission of initial configuration
Co-authored-by: 6543 <6543@obermui.de>
-rw-r--r-- | modules/middlewares/flash.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/middlewares/flash.go b/modules/middlewares/flash.go index 38217288e8..732e1c76ea 100644 --- a/modules/middlewares/flash.go +++ b/modules/middlewares/flash.go @@ -27,6 +27,9 @@ type Flash struct { } func (f *Flash) set(name, msg string, current ...bool) { + if f.Values == nil { + f.Values = make(map[string][]string) + } isShow := false if (len(current) == 0 && FlashNow) || (len(current) > 0 && current[0]) { |