diff --git a/includes/image.inc b/includes/image.inc index 18450ce98f2..171dc75e48b 100644 --- a/includes/image.inc +++ b/includes/image.inc @@ -80,7 +80,7 @@ function image_toolkit_invoke($method, $params = array()) { * 'mime_type': image's MIME type ('image/jpeg', 'image/gif', etc.) */ function image_get_info($file) { - if (!file_exists($file)) { + if (!is_file($file)) { return false; } diff --git a/includes/theme.inc b/includes/theme.inc index d46b31a06d8..d35e83fea14 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -499,7 +499,7 @@ function theme_links($links, $delimiter = ' | ') { * A string containing the image tag. */ function theme_image($path, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE) { - if (!$getsize || (file_exists($path) && (list($width, $height, $type, $image_attributes) = @getimagesize($path)))) { + if (!$getsize || (is_file($path) && (list($width, $height, $type, $image_attributes) = @getimagesize($path)))) { $attributes = drupal_attributes($attributes); return ''. check_plain($alt) .''; }