Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.424
diff -u -p -r1.424 system.module
--- modules/system/system.module	12 Dec 2006 09:48:47 -0000	1.424
+++ modules/system/system.module	13 Dec 2006 03:26:52 -0000
@@ -739,7 +739,8 @@ function system_image_toolkit_settings()
       '#type' => 'radios',
       '#title' => t('Select an image processing toolkit'),
       '#default_value' => variable_get('image_toolkit', image_get_toolkit()),
-      '#options' => $toolkits_available
+      '#options' => $toolkits_available,
+      '#validate' => array('image_toolkit_validate' => array('image_toolkit', 'image_toolkit')),
     );
     $form['image_toolkit_settings'] = image_toolkit_invoke('settings');
 
Index: includes/image.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/image.inc,v
retrieving revision 1.16
diff -u -p -r1.16 image.inc
--- includes/image.inc	12 Dec 2006 01:03:34 -0000	1.16
+++ includes/image.inc	13 Dec 2006 03:26:53 -0000
@@ -44,6 +44,15 @@ function image_get_toolkit() {
 }
 
 /**
+ * Validates toolkit selection.
+ */
+function image_toolkit_validate($formelement, $fieldname) {
+  if ($formelement['#value'] == 'gd' && image_gd_check_settings() == false) {
+    form_set_error('image_toolkit', t('The built-in GD image toolkit requires that the GD module for PHP be installed and configured properly. For more information see !url.', array('!url' => l('http://php.net/image', 'http://php.net/image'))));
+  }
+}
+
+/**
  * Invokes the given method using the currently selected toolkit.
  *
  * @param $method A string containing the method to invoke.
@@ -181,11 +190,10 @@ function image_crop($source, $destinatio
  */
 function image_gd_settings() {
   if (image_gd_check_settings()) {
-    return t('The built-in GD2 toolkit is installed and working properly.');
+    return array('#type' => 'item', '#value' => t('The built-in GD2 toolkit is installed and working properly.'));
   }
   else {
-    form_set_error('image_toolkit', t('The built-in GD image toolkit requires that the GD module for PHP be installed and configured properly. For more information see <a href="@url">PHP\'s image documentation</a>.', array('@url' => 'http://php.net/image')));
-    return FALSE;
+    return array('#type' => 'item', '#value' => t('The built-in GD image toolkit requires that the GD module for PHP be installed and configured properly. For more information see !url.', array('!url' => l('http://php.net/image', 'http://php.net/image'))));
   }
 }
 
