CurlDownloader: Always cast Content-Type header value to string when passing to strtolower() (#10768)
parent
df9721d21b
commit
b171d5531d
|
@ -626,7 +626,7 @@ class CurlDownloader
|
|||
}
|
||||
|
||||
$details = '';
|
||||
if (in_array(strtolower($response->getHeader('content-type')), array('application/json', 'application/json; charset=utf-8'), true)) {
|
||||
if (in_array(strtolower((string) $response->getHeader('content-type')), array('application/json', 'application/json; charset=utf-8'), true)) {
|
||||
$details = ':'.PHP_EOL.substr($response->getBody(), 0, 200).(strlen($response->getBody()) > 200 ? '...' : '');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue