From f450b2e1186dd14a9b47e703c39ade608306945c Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Sat, 2 Mar 2019 19:33:33 +0100 Subject: [PATCH] [SQLiteCache] Check sqlite3 extension in __construct Checks if the sqlite3 extension is loaded and throws an error if it's missing. --- caches/SQLiteCache.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/caches/SQLiteCache.php b/caches/SQLiteCache.php index b3caac34..5cbb3772 100644 --- a/caches/SQLiteCache.php +++ b/caches/SQLiteCache.php @@ -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)) {