Skip to content

Commit 9524570

Browse files
authored
Merge pull request #9729 from michalsn/fix/sqlite-connect
fix: SQLite3 password handling for empty string
2 parents 89fee62 + 9f6c771 commit 9524570

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

system/Database/SQLite3/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function connect(bool $persistent = false)
107107
$this->database = WRITEPATH . $this->database;
108108
}
109109

110-
$sqlite = ($this->password === null || $this->password !== '')
110+
$sqlite = ($this->password === null || $this->password === '')
111111
? new SQLite3($this->database)
112112
: new SQLite3($this->database, SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, $this->password);
113113

user_guide_src/source/changelogs/v4.6.4.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Bugs Fixed
4040
- **Database:** Fixed a bug in ``Database::connect()`` which was causing to store non-shared connection instances in shared cache.
4141
- **Database:** Fixed a bug in ``Connection::getFieldData()`` for ``SQLSRV`` and ``OCI8`` where extra characters were returned in column default values (specific to those handlers), instead of following the convention used by other drivers.
4242
- **Database:** Fixed a bug in ``BaseBuilder::compileOrderBy()`` where the method could overwrite ``QBOrderBy`` with a string instead of keeping it as an array, causing type errors and preventing additional ``ORDER BY`` clauses from being appended.
43+
- **Database:** Fixed a bug in ``SQLite3`` where the password parameter was ignored unless it was an empty string.
4344
- **Forge:** Fixed a bug in ``Postgre`` and ``SQLSRV`` where changing a column's default value using ``Forge::modifyColumn()`` method produced incorrect SQL syntax.
4445
- **Model:** Fixed a bug in ``Model::replace()`` where ``created_at`` field (when available) wasn't set correctly.
4546
- **Model:** Fixed a bug in ``Model::insertBatch()`` and ``Model::updateBatch()`` where casts were not applied to inserted or updated values.

0 commit comments

Comments
 (0)