From 4457de3cda664b83a2acd67a244e6cff06e0282e Mon Sep 17 00:00:00 2001 From: Shish <shish@shishnet.org> Date: Sat, 15 May 2010 14:53:37 +0100 Subject: [PATCH] for compiling under hiphop --- core/database.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/database.class.php b/core/database.class.php index 2a196b46..3e7bcaf3 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -180,12 +180,14 @@ class NoCache implements CacheEngine { public function get_misses() {return 0;} } class MemcacheCache implements CacheEngine { - var $hits=0, $misses=0; + var $memcache=null, $hits=0, $misses=0; public function __construct($args) { $hp = split(":", $args); - $this->memcache = new Memcache; - @$this->memcache->pconnect($hp[0], $hp[1]); + if(class_exists("Memcache")) { + $this->memcache = new Memcache; + @$this->memcache->pconnect($hp[0], $hp[1]); + } } public function get($key) {