[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:
parent
688c950916
commit
f450b2e118
1 changed files with 3 additions and 0 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue