modify
This commit is contained in:
@@ -40,9 +40,9 @@ trait HttpHeaders
|
|||||||
* @param $name
|
* @param $name
|
||||||
* @return mixed|null
|
* @return mixed|null
|
||||||
*/
|
*/
|
||||||
public function getHeader($name): mixed
|
public function getHeader($name, $default = null): mixed
|
||||||
{
|
{
|
||||||
return $this->_headers[$name];
|
return $this->_headers[$name] ?? $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user