Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
maxtsepkov opened this Issue · 6 comments

3 participants

@maxtsepkov

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.

@maxtsepkov

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
3146e9f
@ralphschindler
Collaborator

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?

@maxtsepkov
@Thinkscape
@maxtsepkov

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.

@ralphschindler
Collaborator

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.