We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca49bdf commit 4b2ad82Copy full SHA for 4b2ad82
src/ImageInfo/UtilsTrait.php
@@ -19,13 +19,15 @@ protected static function getEmbeddedImageInfo($content)
19
return false;
20
}
21
22
- $info = getimagesizefromstring(base64_decode(substr($pieces[1], 7)));
+ if (($info = @getimagesizefromstring(base64_decode(substr($pieces[1], 7)))) !== false) {
23
+ return [
24
+ 'width' => $info[0],
25
+ 'height' => $info[1],
26
+ 'size' => $info[0] * $info[1],
27
+ 'mime' => $info['mime'],
28
+ ];
29
+ }
30
- return [
- 'width' => $info[0],
- 'height' => $info[1],
- 'size' => $info[0] * $info[1],
- 'mime' => $info['mime'],
- ];
31
+ return false;
32
-}
33
+}
0 commit comments