diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-04-17 09:50:53 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-04-17 09:50:53 +0000 |
commit | f243e8d41c6df6a674275bc6d63218b0daa584d5 (patch) | |
tree | aa4d08fe762c55318a25a09b2c2550180068fc77 /core | |
parent | 471c1d5b3dda502bee52f5c6cf167a89832ce832 (diff) |
Be graceful if exec() is disabled
Diffstat (limited to 'core')
-rw-r--r-- | core/helpers/graphics.php | 5 |
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); } /** |