diff --git a/README.markdown b/README.markdown index 6937e4fc..235f7a2b 100644 --- a/README.markdown +++ b/README.markdown @@ -29,7 +29,7 @@ check out one of the versioned branches. # Requirements - MySQL/MariaDB 5.1+ (with experimental support for PostgreSQL 9+ and SQLite 3) -- [Stable PHP](https://en.wikipedia.org/wiki/PHP#Release_history) (7.0+ as of writing) +- [Stable PHP](https://en.wikipedia.org/wiki/PHP#Release_history) (7.1+ as of writing) - GD or ImageMagick # Installation diff --git a/core/_install.php b/core/_install.php index 3a876a7d..177a1267 100644 --- a/core/_install.php +++ b/core/_install.php @@ -120,6 +120,7 @@ function do_install() { // {{{ return; } + define("CACHE_DSN", null); define("DEBUG_SQL", false); define("DATABASE_KA", true); install_process(); diff --git a/core/cacheengine.php b/core/cacheengine.php index e1b0b71d..40be954e 100644 --- a/core/cacheengine.php +++ b/core/cacheengine.php @@ -138,7 +138,7 @@ class Cache { public $hits=0, $misses=0; public $time=0; - public function __construct($dsn: string) { + public function __construct(?string $dsn) { $matches = array(); if($dsn && preg_match("#(.*)://(.*)#", $dsn, $matches)) { if($matches[1] == "memcache") { @@ -177,7 +177,7 @@ class Cache { } public function set(string $key, $val, int $time=0) { - $this->engine->set($key, $time, $val); + $this->engine->set($key, $val, $time); if((DEBUG_CACHE === true) || (is_null(DEBUG_CACHE) && @$_GET['DEBUG_CACHE'])) { file_put_contents("data/cache.log", "Cache set: $key ($time)\n", FILE_APPEND); } diff --git a/core/database.php b/core/database.php index 53deef35..c33db38e 100644 --- a/core/database.php +++ b/core/database.php @@ -45,7 +45,7 @@ class Database { * DB connection is on-demand. */ public function __construct() { - $this->cache = Cache(CACHE_DSN); + $this->cache = new Cache(CACHE_DSN); } private function connect_db() {