Due to an unpublished hack, I had a .htaccess file lying around in one of the imagecache preset directories. Using glob($path .'/*') didn't catch that one, because normally shells don't display hidden files with the default '*' pattern. That in turn causes imagecache to display a large white screen of PHP errors, which is baad.

Therefore, I did an alternative implementation using opendir/readdir/closedir instead of the glob function. Slightly larger but also works for people with hidden files. (I could also imagine someone uploading images with a leading dot... although... maybe not... well, it's your decision.)

CommentFileSizeAuthor
imagecache-flush-hidden-files.patch1.07 KBjpetso

Comments

dopry’s picture

committed to head, rev 1.64 with variations.... convert to use dir() instead if opendir...

dopry’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.