Closed (fixed)
Project:
ImageCache
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Apr 2010 at 03:37 UTC
Updated:
2 Jun 2012 at 22:38 UTC
When saving a preset a fatal error is thrown on line 789 of imagecache.module:
while (($entry = $d->read()) !== FALSE) {
This is because $d is NULL.
The problem is that the second time through _imagecache_recursive_delete() a directory could have been deleted but the stat cache still contains the directory. Therefore
is_dir($path);
incorrectly returns TRUE, though the directory has just been deleted.
A call to clearstatcache() after the rmdir($path) call fixes the issue.
This issue appears (at least) with this version of PHP: 5.2.4-2ubuntu5.10
Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| delete_clear_statcache.patch | 590 bytes | benkant |
Comments
Comment #1
Aniara.io commentedPatch works. Thank you!
Comment #2
fizk commentedMarking as ImageCache 2.x Todo.