Bug #9679

PdoHelper fails if username / password are NULL

Added by Robert Lemke about 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Persistence
Start date:
2010-09-10
Due date:
% Done:

100%

PHP Version:
Has patch:
Complexity:

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

Related to TYPO3.Flow - Feature #9626: Switch off autowiring for single methods via @autowiring annotation Resolved 2010-09-07

Associated revisions

Revision b77c41c2 (diff)
Added by Robert Lemke about 9 years ago

[+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 about 9 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF