Skip to content

Commit 3e74a16

Browse files
authored
Cookie error
"setcookie() defines a cookie to be sent along with the rest of the HTTP headers. Like other headers, cookies must be sent before any output from your script (this is a protocol restriction). This requires that you place calls to this function prior to any output." So the call to $this->sendCookies(); must be prior of the call to $this->sendBody(); otherwise the cookies send are not created.
1 parent fb07307 commit 3e74a16

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

system/HTTP/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,8 @@ public function send()
689689
}
690690

691691
$this->sendHeaders();
692-
$this->sendBody();
693692
$this->sendCookies();
693+
$this->sendBody();
694694

695695
return $this;
696696
}

0 commit comments

Comments
 (0)