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

Uwe Hermann’s picture

Status: Active » Fixed

I think this is fixed in head now, as is_file() is used. Please reopen if it's still an issue.

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)