Skip to content

Commit

Permalink
Ensure that response status is an int
Browse files Browse the repository at this point in the history
  • Loading branch information
igorw committed Jan 31, 2013
1 parent af59cf3 commit 1142522
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/React/Http/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function writeHead($status = 200, array $headers = array())

private function formatHead($status, array $headers)
{
$status = (int) $status;
$text = isset(ResponseCodes::$statusTexts[$status]) ? ResponseCodes::$statusTexts[$status] : '';
$data = "HTTP/1.1 $status $text\r\n";

Expand Down

0 comments on commit 1142522

Please sign in to comment.