fileCache::delete() passes the cache object into fopen() and unlink(), producing errors.

Patch file attached.

CommentFileSizeAuthor
file.patch766 byteschenba

Comments

greg.harvey’s picture

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.

sinasalek’s picture

Status: Active » Reviewed & tested by the community

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 :)

slantview’s picture

Status: Reviewed & tested by the community » Fixed

This has been committed to the dev branch. New release forthcoming.

Status: Fixed » Closed (fixed)

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

vacilando’s picture

Version: 6.x-1.0-beta8 » 6.x-1.0-rc1
Status: Closed (fixed) » Active

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.

harking’s picture

Status: Active » Closed (fixed)

@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.