MINOR: properly check the existance of SQLite3 class

This commit is contained in:
Andreas Piening 2010-03-10 23:59:30 +00:00
parent 63a70c2bae
commit 7360cd57a7

View File

@ -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';