Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.515
diff -u -r1.515 theme.inc
--- includes/theme.inc	25 Aug 2009 15:39:13 -0000	1.515
+++ includes/theme.inc	26 Aug 2009 06:58:53 -0000
@@ -1483,8 +1483,9 @@
 function theme_image($path, $alt = '', $title = '', $attributes = array(), $getsize = TRUE) {
   if (!$getsize || (is_file($path) && (list($width, $height, $type, $image_attributes) = @getimagesize($path)))) {
     $attributes = drupal_attributes($attributes);
+    $image_attributes = !empty($image_attributes) ? ' ' . $image_attributes : '';
     $url = file_create_url($path);
-    return '<img src="' . check_url($url) . '" alt="' . check_plain($alt) . '" title="' . check_plain($title) . '" ' . (isset($image_attributes) ? $image_attributes : '') . $attributes . ' />';
+    return '<img src="' . check_url($url) . '" alt="' . check_plain($alt) . '" title="' . check_plain($title) . '"' . $image_attributes . $attributes . ' />';
   }
 }
 
