We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f6a488 commit 393fec6Copy full SHA for 393fec6
src/ImageData/LogoImageData.php
@@ -113,9 +113,14 @@ public function createDataUri(): string
113
private static function detectMimeTypeFromUrl(string $url): string
114
{
115
$headers = get_headers($url, true);
116
+
117
+ if (!is_array($headers)) {
118
+ throw new \Exception(sprintf('Could not retrieve headers to determine content type for logo URL "%s"', $url));
119
+ }
120
121
$headers = array_combine(array_map('strtolower', array_keys($headers)), $headers);
122
- if (!is_array($headers) || !isset($headers['content-type'])) {
123
+ if (!isset($headers['content-type'])) {
124
throw new \Exception(sprintf('Content type could not be determined for logo URL "%s"', $url));
125
}
126
0 commit comments