Skip to content


Subversion checkout URL

You can clone with
Download ZIP


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

maxtsepkov opened this Issue · 6 comments

3 participants


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.


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

@maxtsepkov maxtsepkov referenced this issue from a commit in maxtsepkov/zf2
@maxtsepkov maxtsepkov do not strip options from connection parameters
closes #4092

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?


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.


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.