diff --git a/src/aphront/AphrontRequest.php b/src/aphront/AphrontRequest.php --- a/src/aphront/AphrontRequest.php +++ b/src/aphront/AphrontRequest.php @@ -931,13 +931,13 @@ } } - foreach ($headers as $header) { - list($key, $value) = $header; - switch ($key) { + foreach ($headers as $header_key => $header) { + list($header_head, $header_body) = $header; + switch ($header_head) { case 'Host': case 'Authorization': // Don't forward these headers, we've already handled them elsewhere. - unset($headers[$key]); + unset($headers[$header_key]); break; default: break;