fileCache::delete() passes in wrong argument type for fopen() and unlink()
chenba - December 31, 2008 - 16:54
| Project: | Cache Router |
| Version: | 6.x-1.0-rc1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
fileCache::delete() passes the cache object into fopen() and unlink(), producing errors.
Patch file attached.
| Attachment | Size |
|---|---|
| file.patch | 766 bytes |

#1
Fixes in #436196: warning: fopen() expects parameter 1 to be string, object given in... cacherouter/engines/file.php on line 113. seemed to cause the Clear Caches button in the performance settings page of Drupal 6 to stop working. I'm currently clearing caches by deleting the contents of the filecache destination directory. I'm not sure if it's related, or it's always done this and I didn't notice.
#2
I applied this patch and it works fine. the patch itself is simple and reasonable.
Warning disappeared and i can confirm that clear cached data button also works
Please commit.
PS : Development snapshots are quite useful :)
#3
This has been committed to the dev branch. New release forthcoming.
#4
Automatically closed -- issue fixed for 2 weeks with no activity.
#5
I think there still is some problem with unlinking in rc1. I frequently get this message:
warning: unlink(sites/MYSITE.TLD/files/cacherouter/cache/8/87cd8b8808600624d8c590cfc2e6e94b--variables) [function.unlink]: No such file or directory in /mnt/MYSITE.TLD/web/content/sites/all/modules/cacherouter/engines/file.php on line 160.Seems always to have "--variables" at the end of the file name.
#6
@vacilando:
This bug directly relates to the unlink not having the correct variable passed in.
I think your issue deals with the file being removed or an invalid formatting of the variable.