top-think / think

ThinkPHP Framework ——十年匠心的高性能PHP框架
http://www.thinkphp.cn
Other
7.83k stars 1.62k forks source link

\think\Response.php line 158 $this->cookie->save(); 报错 cookie 为null #951

Open mgzhenhong opened 5 years ago

mgzhenhong commented 5 years ago

app 中继承 app\BaseController, 重写 initialize

$response = redirect(url('user/login') -> build());
$response -> send();

报错 Call to a member function save() on null

[0] Error in Response.php line 158

$this->cookie->save();

liu21st commented 5 years ago

用法不当