Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/Yousha/zf2 into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
25 changes: 12 additions & 13 deletions src/Headers.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,17 +264,17 @@ public function get($name)
$headers[] = $this->headers[$index];
}
return new ArrayIterator($headers);
} else {
$index = array_search($key, $this->headersKeys);
if ($index === false) {
return false;
}
if (is_array($this->headers[$index])) {
return $this->lazyLoadHeader($index);
} else {
return $this->headers[$index];
}
}

$index = array_search($key, $this->headersKeys);
if ($index === false) {
return false;
}

if (is_array($this->headers[$index])) {
return $this->lazyLoadHeader($index);
}
return $this->headers[$index];
}

/**
Expand Down Expand Up @@ -441,11 +441,10 @@ protected function lazyLoadHeader($index)
$this->headers[] = $header;
}
return $current;
} else {
$this->headers[$index] = $current = $headers;
return $current;
}

$this->headers[$index] = $current = $headers;
return $current;
}

/**
Expand Down
3 changes: 1 addition & 2 deletions src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,7 @@ protected function decodeDeflate($body)

if ($zlibHeader[1] % 31 == 0) {
return gzuncompress($body);
} else {
return gzinflate($body);
}
return gzinflate($body);
}
}

0 comments on commit 8b2606e

Please sign in to comment.