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
Description

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

Patch file attached.

AttachmentSize
file.patch766 bytes

#1

greg.harvey - May 29, 2009 - 18:36

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

sinasalek - August 29, 2009 - 07:33
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 :)

#3

slantview - September 3, 2009 - 06:27
Status:reviewed & tested by the community» fixed

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

#4

System Message - September 17, 2009 - 06:30
Status:fixed» closed

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

#5

vacilando - September 18, 2009 - 08:38
Version:6.x-1.0-beta8» 6.x-1.0-rc1
Status:closed» 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.

#6

harking - September 18, 2009 - 16:06
Status:active» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.