mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-18 05:04:51 +08:00
add compatibility for PHP 8.1
This commit is contained in:
parent
82c44d6c40
commit
e95925c129
@ -119,7 +119,7 @@ class Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function header($key, $value, $ucwords = null) {
|
||||
if (!$this->is_end) return $this->response->header($key, $value, $ucwords);
|
||||
if (!$this->is_end) return $ucwords === null ? $this->response->header($key, $value) : $this->response->header($key, $value, $ucwords);
|
||||
else return false;
|
||||
}
|
||||
|
||||
@ -130,7 +130,8 @@ class Response
|
||||
* @return mixed
|
||||
*/
|
||||
public function setHeader($key, $value, $ucwords = null) {
|
||||
return !$this->is_end ? $this->response->setHeader($key, $value, $ucwords) : false;
|
||||
if (!$this->is_end) return $ucwords === null ? $this->response->setHeader($key, $value) : $this->response->setHeader($key, $value, $ucwords);
|
||||
else return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user