Skip to content

Commit 65bdfa0

Browse files
committed
fix bug in sqlite connector
1 parent 376e9f1 commit 65bdfa0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Illuminate/Database/Connectors/SQLiteConnector.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public function connect(array $config)
3838
*/
3939
protected function parseDatabasePath(string $path): string
4040
{
41+
$database = $path;
42+
4143
// SQLite supports "in-memory" databases that only last as long as the owning
4244
// connection does. These are useful for tests or for short lifetime store
4345
// querying. In-memory databases shall be anonymous (:memory:) or named.
@@ -54,7 +56,7 @@ protected function parseDatabasePath(string $path): string
5456
// as the developer probably wants to know if the database exists and this
5557
// SQLite driver will not throw any exception if it does not by default.
5658
if ($path === false) {
57-
throw new SQLiteDatabaseDoesNotExistException($path);
59+
throw new SQLiteDatabaseDoesNotExistException($database);
5860
}
5961

6062
return $path;

0 commit comments

Comments
 (0)