Posted by Alexandr Kosarev on January 28, 2010 at 9:07pm
| Project: | Cache Router |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
PEAR Cache_Lite have Cache.php, I use Cache_Lite in modules,
and because of line
<?php
require 'Cache.php';
?>in CacheRouter.php it is problem - cacherouter include Cache.php from PEAR package, if I change include_path Cache_Lite include Cache.php from cacherouter and it is problem again.
<?php
require drupal_get_path('module', 'cacherouter').'/Cache.php';
?>didn't work, because of cacherouter design.
and option
<?php
require getcwd().'sites/all/modules/cacheroter/Cache.php';
?>can not be provided as patch because of hardcoded path.
Any ideas how I can do acceptable patch for this issue?
Comments
#1
need more info because CR uses
<?phprequire dirname(__FILE__) .'/Cache.php';
?>
maybe your bug related #564460: Class conflict, namespace collisions
#2
suggestion solution work just fine
I have did it as patch
#3
previous path was created by "diff file file"
this one is by "diff -up file file"
#4
@Alexander You does not understand me, cacherouter includes files from it's own folder.
dirname(__FILE__) returns cachetouter's folder, it's the same as
<?phprequire './Cache.php';
?>
Please try 5-dev version which already fixed, your patch against cvs will break things
<?phprequire dirname(__FILE__) .'/Cache.php';
?>
Your problem caused by 5-beta9 which is
<?phprequire 'Cache.php';
?>
#5
This is a duplicate of #564460: Class conflict, namespace collisions
#6
with DEV version this problem solved.
thanks.
#7
This is dup