aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-12-17 17:45:49 +0000
committerpatdenice <patdenice@piwigo.org>2011-12-17 17:45:49 +0000
commitb3ce83e9cb53ac9de13463f37645a01bad7ca9da (patch)
tree1fb2511b4df43181fb9713ec6757be74ec019720
parent1c84017d23a40de0595afd2352ccc0b3935b7dd1 (diff)
bug:2537
Thumbnail creation may crash on some servers git-svn-id: http://piwigo.org/svn/trunk@12756 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/image.class.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/admin/include/image.class.php b/admin/include/image.class.php
index b6c33e269..53a27b924 100644
--- a/admin/include/image.class.php
+++ b/admin/include/image.class.php
@@ -421,8 +421,8 @@ class image_ext_imagick implements imageInterface
$this->imagickdir = $imagickdir;
$command = $imagickdir.'identify -format "%wx%h" "'.realpath($source_filepath).'"';
- @exec($command, $returnarray, $returnvalue);
- if($returnvalue or !preg_match('/^(\d+)x(\d+)$/', $returnarray[0], $match))
+ @exec($command, $returnarray);
+ if(!is_array($returnarray) or empty($returnarray[0]) or !preg_match('/^(\d+)x(\d+)$/', $returnarray[0], $match))
{
die("[External ImageMagick] Corrupt image");
}
@@ -495,8 +495,8 @@ class image_ext_imagick implements imageInterface
$dest = pathinfo($destination_filepath);
$exec .= ' "'.realpath($dest['dirname']).'/'.$dest['basename'].'"';
- @exec($exec, $returnarray, $returnvalue);
- return !$returnvalue;
+ @exec($exec, $returnarray);
+ return is_array($returnarray);
}
}