Skip to content

Commit cb4d0ef

Browse files
committed
fixes
1 parent d32cf7d commit cb4d0ef

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Embed/FastImage.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@ class FastImage
2222
private $type;
2323
private $handle;
2424

25-
public function __construct($uri = null)
26-
{
27-
if ($uri) $this->load($uri);
25+
public function __construct ($uri = null) {
26+
if ($uri) {
27+
$this->load($uri);
28+
}
2829
}
2930

3031

31-
public function load($uri)
32-
{
33-
if ($this->handle) $this->close();
32+
public function load ($uri) {
33+
if ($this->handle) {
34+
$this->close();
35+
}
3436

3537
$this->uri = $uri;
3638

@@ -261,6 +263,10 @@ public static function sortImagesBySize (array $images) {
261263
$sortedImages = array();
262264

263265
foreach ($images as $image) {
266+
if (!$image) {
267+
continue;
268+
}
269+
264270
try {
265271
$Image = new static($image);
266272

0 commit comments

Comments
 (0)