This repository was archived by the owner on Sep 20, 2021. It is now read-only.

Description
Hello,
I'm using the HTTP (v1.17.01.13) component through the Websocket library (v3.17.01.09), and I've got an issue when the \Hoa\Http\Response\Response::__destruct() method is called :
Trying to access array offset on value of type bool in /XXX/hoa/http/Response/Response.php on line 947
It seems to be because the response is initialized with the parameter $newBuffer = false, and the self::$_stack is empty.
This is the line the error occurred in the __destruct method :
|
$last = current(self::$_stack); |
Change the line above with this seems to fix the bug:
if (false === $last = current(self::$_stack)) {
return;
}