Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Not an Issue
-
Affects Version/s: 1.9.4
-
Fix Version/s: None
-
Component/s: Zend_Cache
-
Labels:None
Description
Code
$backend = Zend_Cache::_makeBackend($options['backend'], $options['backendOptions']); $backend = new Dklab_Cache_Backend_Profiler($backend, array("R00_Profiler_Cache", "profilerCallback")); $cache = Zend_Cache::factory($frontend, $backend, array_merge($options['frontendOptions'], $frontendOptions));
Result
Catchable fatal error: Argument 1 passed to Zend_Cache_Core::setBackend() must be an instance of Zend_Cache_Backend, instance of Dklab_Cache_Backend_Profiler given, called in D:\work\meetster\library\Zend\Cache.php on line 110 and defined in D:\work\meetster\library\Zend\Cache\Core.php on line 168
Also
class Dklab_Cache_Backend_Profiler implements Zend_Cache_Backend_Interface { ... } // http://dklab.ru/lib/Dklab_Cache/
Your problem with the param passed, the Type Hinting of the Zend_Cache_Core::setBackend().
public function setBackend(Zend_Cache_Backend $backendObject)try
class Dklab_Cache_Backend_Profiler extends Zend_Cache_Backend implements Zend_Cache_Backend_Interface
public function setBackend(Zend_Cache_Backend $backendObject)