summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-04-17 09:50:53 +0000
committerBharat Mediratta <bharat@menalto.com>2009-04-17 09:50:53 +0000
commitf243e8d41c6df6a674275bc6d63218b0daa584d5 (patch)
treeaa4d08fe762c55318a25a09b2c2550180068fc77
parent471c1d5b3dda502bee52f5c6cf167a89832ce832 (diff)
Be graceful if exec() is disabled
-rw-r--r--core/helpers/graphics.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/helpers/graphics.php b/core/helpers/graphics.php
index 1caebc44..c0ef98db 100644
--- a/core/helpers/graphics.php
+++ b/core/helpers/graphics.php
@@ -269,9 +269,10 @@ class graphics_Core {
*/
static function detect_toolkits() {
$gd = function_exists("gd_info") ? gd_info() : array();
+ $exec = function_exists("exec");
return array("gd" => $gd,
- "imagemagick" => dirname(exec("which convert")),
- "graphicsmagick" => dirname(exec("which gm")));
+ "imagemagick" => $exec ? dirname(exec("which convert")) : false,
+ "graphicsmagick" => $exec ? dirname(exec("which gm")) : false);
}
/**