1
0
Fork 0

CurlDownloader: Always cast Content-Type header value to string when passing to strtolower() (#10768)

pull/10769/head
Zan Baldwin 2022-05-11 19:17:58 +02:00 committed by GitHub
parent df9721d21b
commit b171d5531d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 ? '...' : '');
}