https://reisub.nsupdate.info/git
/
friendica.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e17befb
)
Update src/Network/GuzzleResponse.php
author
Philipp
<admin+Github@philipp.info>
Sat, 10 Oct 2020 22:33:36 +0000
(
00:33
+0200)
committer
GitHub
<noreply@github.com>
Sat, 10 Oct 2020 22:33:36 +0000
(
00:33
+0200)
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
src/Network/GuzzleResponse.php
patch
|
blob
|
history
diff --git
a/src/Network/GuzzleResponse.php
b/src/Network/GuzzleResponse.php
index
18155d1
..
b1bbaa9
100644
(file)
--- a/
src/Network/GuzzleResponse.php
+++ b/
src/Network/GuzzleResponse.php
@@
-89,12
+89,7
@@
class GuzzleResponse extends Response implements IHTTPResult, ResponseInterface
public function getContentType()
{
$contentTypes = $this->getHeader('Content-Type') ?? [];
- $countTypes = count($contentTypes);
- if ($countTypes > 0) {
- return $contentTypes[$countTypes - 1];
- } else {
- return '';
- }
+ return array_pop($contentTypes) ?? '';
}
/** {@inheritDoc} */