mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进Response类getHeader方法
This commit is contained in:
@@ -284,7 +284,11 @@ class Response
|
||||
*/
|
||||
public function getHeader($name = '')
|
||||
{
|
||||
return !empty($name) ? $this->header[$name] : $this->header;
|
||||
if (!empty($name)) {
|
||||
return isset($this->header[$name]) ? $this->header[$name] : null;
|
||||
} else {
|
||||
return $this->header;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user