mirror of
https://gitee.com/johng/gf.git
synced 2024-12-04 05:07:44 +08:00
fix issue of ghttp.Request.GetVar
This commit is contained in:
parent
2063f662d3
commit
503446afc7
@ -29,7 +29,7 @@ func (r *Request) GetRequest(key string, def ... []string) []string {
|
|||||||
func (r *Request) GetRequestVar(key string, def ... interface{}) gvar.VarRead {
|
func (r *Request) GetRequestVar(key string, def ... interface{}) gvar.VarRead {
|
||||||
value := r.GetRequest(key)
|
value := r.GetRequest(key)
|
||||||
if value != nil {
|
if value != nil {
|
||||||
return gvar.New(value, false)
|
return gvar.New(value[0], false)
|
||||||
}
|
}
|
||||||
if len(def) > 0 {
|
if len(def) > 0 {
|
||||||
return gvar.New(def[0], false)
|
return gvar.New(def[0], false)
|
||||||
|
Loading…
Reference in New Issue
Block a user