diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-06-19 08:59:06 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-06-19 08:59:06 +0000 |
commit | eb536bf5ec2ac4e8a8624a3a407691c7270ceef0 (patch) | |
tree | c699e100e26b5e9b93ea47605aeccbebc332d4dc | |
parent | abc16b1d6d3233fddc53ea6d01ecc91df7aea395 (diff) | |
download | brdo-eb536bf5ec2ac4e8a8624a3a407691c7270ceef0.tar.gz brdo-eb536bf5ec2ac4e8a8624a3a407691c7270ceef0.tar.bz2 |
- Patch #24157 by chx/Robin/...: changed file_exists() to is_file() to fix several problems with modules using theimage toolkit.
-rw-r--r-- | includes/image.inc | 2 | ||||
-rw-r--r-- | includes/theme.inc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/includes/image.inc b/includes/image.inc index 18450ce98..171dc75e4 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 d46b31a06..d35e83fea 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 '<img src="'. check_url($path) .'" alt="'. check_plain($alt) .'" title="'. check_plain($title) .'" '. $image_attributes . $attributes .'/>'; } |