Closed (fixed)
Project:
Drupal core
Component:
base system
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 May 2005 at 17:10 UTC
Updated:
8 Oct 2005 at 07:20 UTC
I noticed that if image_get_info is called in a situation where a folder is specified but there is no file, errors are returned (obviously).
I propose adding a check to make sure the $file variable is not a directory, with the following code change:
before
function image_get_info($file) {
if (!file_exists($file)) {
return false;
}
after
function image_get_info($file) {
if (!file_exists($file)||is_dir($file)) {
return false;
}
Comments
Comment #1
Uwe Hermann commentedI think this is fixed in head now, as
is_file()is used. Please reopen if it's still an issue.Comment #2
(not verified) commentedComment #3
(not verified) commentedComment #4
(not verified) commentedComment #5
(not verified) commented