Skip to content

Commit a829ab8

Browse files
author
okarpenko
committed
MAGETWO-33074: Upgrade response class
- remove bad code
1 parent 652d1c5 commit a829ab8

File tree

1 file changed

+2
-5
lines changed
  • lib/internal/Magento/Framework/HTTP/PhpEnvironment

1 file changed

+2
-5
lines changed

lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,8 @@ public function clearHeader($name)
108108
{
109109
$headers = $this->getHeaders();
110110
if ($headers->has($name)) {
111-
foreach ($headers as $header) {
112-
if (strtolower($header->getFieldName()) == strtolower($name)) {
113-
$headers->removeHeader($header);
114-
}
115-
}
111+
$header = $headers->get($name);
112+
$headers->removeHeader($header);
116113
}
117114

118115
return $this;

0 commit comments

Comments
 (0)