Commit e41657c4 by Taylor Otwell

do not check for existence of sqlite database before connecting.

parent dd8ebe60
...@@ -21,12 +21,12 @@ class SQLite extends Connector { ...@@ -21,12 +21,12 @@ class SQLite extends Connector {
return new PDO('sqlite::memory:', null, null, $options); return new PDO('sqlite::memory:', null, null, $options);
} }
if (file_exists($path = DATABASE_PATH.$config['database'].'.sqlite')) // SQLite databases will be created automatically if they do not exist, so we
{ // will not check for the existence of the database file before establishing
return new PDO('sqlite:'.$path, null, null, $options); // the PDO connection to the database.
} $path = DATABASE_PATH.$config['database'].'.sqlite';
throw new \Exception("SQLite database [{$config['database']}] could not be found."); return new PDO('sqlite:'.$path, null, null, $options);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment