mirror of
https://github.com/silverstripe/silverstripe-sqlite3
synced 2024-10-22 17:05:37 +02:00
MINOR: properly check the existance of SQLite3 class
This commit is contained in:
parent
63a70c2bae
commit
7360cd57a7
@ -20,7 +20,7 @@ if(array_search($databaseConfig['type'], array('SQLiteDatabase', 'SQLite3Databas
|
||||
);
|
||||
|
||||
// The SQLite3 class is available in PHP 5.3 and newer
|
||||
if($databaseConfig['type'] == 'SQLitePDODatabase' || version_compare(phpversion(), '5.3.0', '<')) {
|
||||
if($databaseConfig['type'] == 'SQLitePDODatabase' || !class_exists('SQLite3')) {
|
||||
$databaseConfig['type'] = 'SQLitePDODatabase';
|
||||
} else {
|
||||
$databaseConfig['type'] = 'SQLite3Database';
|
||||
|
Loading…
Reference in New Issue
Block a user