Skip to content

Commit 632465f

Browse files
committed
Image: fixed empty error_get_last() [Closes #183]
1 parent f09fd95 commit 632465f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Utils/Image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ private function output(int $type, ?int $quality, string $file = null): void
567567
throw new Nette\InvalidArgumentException("Unsupported image type '$type'.");
568568
}
569569
if (!$success) {
570-
throw new ImageException(error_get_last()['message']);
570+
throw new ImageException(error_get_last()['message'] ?: 'Unknown error');
571571
}
572572
}
573573

0 commit comments

Comments
 (0)