diff options
Diffstat (limited to 'include/photos.php')
-rw-r--r-- | include/photos.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/photos.php b/include/photos.php index 495043bbf..2d2c9cc13 100644 --- a/include/photos.php +++ b/include/photos.php @@ -84,10 +84,11 @@ function photo_upload($channel, $observer, $args) { // logger('imagick thumbnail command: ' . $cmd); for($x = 0; $x < 4; $x ++) { exec($cmd); - if(! file_exists($tmp_name)) { - logger('imagick scale failed. Retrying.'); - continue; + if(file_exists($tmp_name)) { + break; } + logger('imagick scale failed. Retrying.'); + continue; } if(! file_exists($tmp_name)) { logger('imagick scale failed. Abort.'); |