git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4acd797
)
fix php 8 warning when req has no content-type header
author
gggeek
<giunta.gaetano@gmail.com>
Fri, 25 Nov 2022 11:05:28 +0000
(11:05 +0000)
committer
gggeek
<giunta.gaetano@gmail.com>
Fri, 25 Nov 2022 11:05:28 +0000
(11:05 +0000)
src/Request.php
patch
|
blob
|
history
diff --git
a/src/Request.php
b/src/Request.php
index
5af3e41
..
e356008
100644
(file)
--- a/
src/Request.php
+++ b/
src/Request.php
@@
-279,7
+279,10
@@
class Request
}
// try to 'guestimate' the character encoding of the received response
- $respEncoding = XMLParser::guessEncoding(@$this->httpResponse['headers']['content-type'], $data);
+ $respEncoding = XMLParser::guessEncoding(
+ isset($this->httpResponse['headers']['content-type']) ? $this->httpResponse['headers']['content-type'] : '',
+ $data
+ );
if ($this->debug) {
$start = strpos($data, '<!-- SERVER DEBUG INFO (BASE64 ENCODED):');