Adding return false when Memcache is set as the cache engine and the memcache extension is not installed.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4939 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-04-30 07:52:17 +00:00
parent b3850c56e8
commit b6fb4d80d0

View file

@ -43,6 +43,9 @@ class MemcacheEngine extends CacheEngine {
* @return boolean True if the engine has been succesfully initialized, false if not * @return boolean True if the engine has been succesfully initialized, false if not
*/ */
function init(&$params) { function init(&$params) {
if(!class_exists('Memcache')) {
return false;
}
$servers = array('127.0.0.1'); $servers = array('127.0.0.1');
$compress = false; $compress = false;
extract($params); extract($params);