Skip to content

Commit 44a00f1

Browse files
committed
fix cannot use backup driver
$ci = &get_instance(); $ci->load->driver('cache', array('adapter' => 'memcached', 'backup' => 'file')); $ci->cache->get('cache_key'); // if the Memcached(Memcache) Extension does not exist, it will not work. // Fatal error: Call to a member function get() on a non-object in .../system/libraries/Cache/drivers/Cache_memcached.php on line 50
1 parent 082d803 commit 44a00f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

system/libraries/Cache/Cache.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ public function __get($child)
203203
if ( ! $this->is_supported($child))
204204
{
205205
$this->_adapter = $this->_backup_driver;
206+
$obj = parent::__get($this->_adapter);
206207
}
207208

208209
return $obj;
@@ -211,4 +212,4 @@ public function __get($child)
211212
}
212213

213214
/* End of file Cache.php */
214-
/* Location: ./system/libraries/Cache/Cache.php */
215+
/* Location: ./system/libraries/Cache/Cache.php */

0 commit comments

Comments
 (0)