Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Zend\Db\Adapter\Adapter ignores driver options (charset issue) #4092

maxtsepkov opened this Issue · 6 comments

3 participants

Max Tsepkov Ralph Schindler Artur Bodera
Max Tsepkov

In Zend\Db\Adapter\Adapter::createDriver() the class remove options from passed parameters.
It then passes the removed options array to Mysqli driver only, but not others.

However, Zend\Db\Adapter\Driver\Pdo\Connection expects options array in connection parameters.
It then passes this array to PDO.

It makes user unable to pass PDO options cause Adapter removes it from connection parameters.

Max Tsepkov

Alternatively, one can pass charset=utf8 to DSN.
However this should be reflected in the documentation, because it still states charset option.

Max Tsepkov maxtsepkov referenced this issue from a commit in maxtsepkov/zf2
Max Tsepkov maxtsepkov do not strip options from connection parameters
closes #4092
Ralph Schindler

Do you already have a PR for this?

Actually- why wouldn't you pass charset as part of the connection parameters like username or password?

Max Tsepkov
Artur Bodera
Max Tsepkov

Like I said, this bug was reported 8 months ago.
May be you have reported the same bug few months later with PR and it got fixed.
If that is the case, this one should be closed.

Ralph Schindler

It was fixed as part of #4973 and it is in develop, not master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.