From eb536bf5ec2ac4e8a8624a3a407691c7270ceef0 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 19 Jun 2005 08:59:06 +0000 Subject: - Patch #24157 by chx/Robin/...: changed file_exists() to is_file() to fix several problems with modules using theimage toolkit. --- includes/image.inc | 2 +- includes/theme.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'includes') 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 ''. check_plain($alt) .''; } -- cgit v1.2.3