Bug #9679
PdoHelper fails if username / password are NULL
Status: | Resolved | Start date: | 2010-09-10 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Robert Lemke | % Done: | 100% |
|
Category: | Persistence | |||
Target version: | TYPO3 Flow Base Distribution - 1.0 alpha 12 | |||
PHP Version: | Complexity: | |||
Has patch: | Affected Flow version: |
Description
By default the username and password passed to the PDO backend are NULL because SQLite does not need a username / password in our case.
The recent refactoring in the static object container now detects that NULL is passed to the PDO backend but a string is expected:
#1283859777: Tried to create instance of class F3\FLOW3\Utility\PdoHelper without passing constructor argument $user in Packages/Framework/FLOW3/Classes/Persistence/Backend/GenericPdo/Backend.php line 122
This error is triggered when no Objects.db exists and the backend tries to create one.
Related issues
Associated revisions
[+BUGFIX] FLOW3 (Persistence): Safeguard for PDO credentials and DSN
The username, password and DSN for the PDO backend could, until now,
be NULL without causing any trouble. More correct though is an empty
string if they shouldn't be specified. In addition the old approach
caused an exception since recently.
Now the backend checks for the type of the credentials and the default
setting was adjusted to empty strings instead of NULL.
Change-Id: Ic551bf5985502135b48414d77c4611859fbef77d
Resolves: #9679
History
#1 Updated by Robert Lemke almost 5 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset b77c41c22a526e71961c1c3a35399e89fb4199ef.