Fix getHeader()

This commit is contained in:
Philipp Holzer 2021-08-20 22:00:28 +02:00
parent 65ca164487
commit 653d49cb92
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD

View file

@ -173,7 +173,7 @@ class Media
$media['mimetype'] = $curlResult->getHeader('Content-Type')[0] ?? '';
}
if (empty($media['size'])) {
$media['size'] = (int)$curlResult->getHeader('Content-Length')[0] ?? 0;
$media['size'] = (int)($curlResult->getHeader('Content-Length')[0] ?? 0);
}
} else {
Logger::notice('Could not fetch head', ['media' => $media]);