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 d32cf7d commit cb4d0efCopy full SHA for cb4d0ef
Embed/FastImage.php
@@ -22,15 +22,17 @@ class FastImage
22
private $type;
23
private $handle;
24
25
- public function __construct($uri = null)
26
- {
27
- if ($uri) $this->load($uri);
+ public function __construct ($uri = null) {
+ if ($uri) {
+ $this->load($uri);
28
+ }
29
}
30
31
- public function load($uri)
32
33
- if ($this->handle) $this->close();
+ public function load ($uri) {
+ if ($this->handle) {
34
+ $this->close();
35
36
37
$this->uri = $uri;
38
@@ -261,6 +263,10 @@ public static function sortImagesBySize (array $images) {
261
263
$sortedImages = array();
262
264
265
foreach ($images as $image) {
266
+ if (!$image) {
267
+ continue;
268
269
+
270
try {
271
$Image = new static($image);
272
0 commit comments