[SQLiteCache] Check sqlite3 extension in __construct

Checks if the sqlite3 extension is loaded and throws an error
if it's missing.
This commit is contained in:
logmanoriginal 2019-03-02 19:33:33 +01:00
parent 688c950916
commit f450b2e118

View file

@ -9,6 +9,9 @@ class SQLiteCache implements CacheInterface {
private $db = null;
public function __construct() {
if (!extension_loaded('sqlite3'))
die('"sqlite3" extension not loaded. Please check "php.ini"');
$file = PATH_CACHE . 'cache.sqlite';
if (!is_file($file)) {