summaryrefslogtreecommitdiff
path: root/core/helpers/graphics.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/helpers/graphics.php')
-rw-r--r--core/helpers/graphics.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/helpers/graphics.php b/core/helpers/graphics.php
index 9954bf22..cd112e1b 100644
--- a/core/helpers/graphics.php
+++ b/core/helpers/graphics.php
@@ -236,7 +236,12 @@ class graphics_Core {
* GraphicsMagick we return the path to the directory containing the appropriate binaries.
*/
static function detect_toolkits() {
- return array("gd" => function_exists("gd_info") ? gd_info() : array(),
+ try {
+ $gd = function_exists("gd_info") ? gd_info() : array();
+ } catch (Exception $e) {
+ $gd = array();
+ }
+ return array("gd" => $gd,
"imagemagick" => dirname(exec("which convert")),
"graphicsmagick" => dirname(exec("which gm")));
}