From f243e8d41c6df6a674275bc6d63218b0daa584d5 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 17 Apr 2009 09:50:53 +0000 Subject: Be graceful if exec() is disabled --- core/helpers/graphics.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core/helpers') 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); } /** -- cgit v1.2.3