Skip to content

Commit 543c9e0

Browse files
committed
Releasing 1.1.11
2 parents c2844f9 + e8db8fe commit 543c9e0

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/TgUtils/ImageUtils.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ class ImageUtils {
1313
* @return string - the path of the new image file, e.g. /target/dir/basename.variation.png (or NULL in case of GD issues)
1414
*/
1515
public static function createThumbnail($imagePath, $maxWidth, $maxHeight, $targetDir = NULL) {
16-
$targetPath = self::getNewPath($imagePath, 'thumbnail', $targetDir);
16+
if (!file_exists($imagePath)) {
17+
$targetPath = NULL;
18+
} else {
19+
$targetPath = self::getNewPath($imagePath, 'thumbnail', $targetDir);
20+
}
1721

1822
if ($targetPath != NULL) {
1923
if (class_exists('Imagick')) {

test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Test script
22

33
composer update
4-
RC=./vendor/phpunit/phpunit/phpunit tests
5-
rm -rf vendor composer.lock
4+
./vendor/phpunit/phpunit/phpunit tests
5+
RC=$?
66
exit $RC
77

0 commit comments

Comments
 (0)