mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-25 09:35:34 +08:00
add compatibility for PHP 8.1
This commit is contained in:
@@ -119,7 +119,7 @@ class Response
|
|||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function header($key, $value, $ucwords = null) {
|
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;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,7 +130,8 @@ class Response
|
|||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function setHeader($key, $value, $ucwords = null) {
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user