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

Closed
mercuriev opened this Issue Mar 22, 2013 · 6 comments

Comments

Projects
None yet
3 participants
Contributor

mercuriev commented Mar 22, 2013

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.

Contributor

mercuriev commented Mar 22, 2013

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

mercuriev added a commit to mercuriev/zf2 that referenced this issue Mar 31, 2013

Member

ralphschindler commented Nov 15, 2013

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?

Contributor

mercuriev commented Nov 17, 2013

No. That bug is there for a while and I don't have time to catch up now.
16.11.2013 0:05 пользователь "Ralph Schindler" notifications@github.com
написал:

Do you already have a PR for this?


Reply to this email directly or view it on GitHubhttps://github.com/zendframework/zf2/issues/4092#issuecomment-28585393
.

Member

Thinkscape commented Nov 17, 2013

I have reported this a few months back... a fix has been recently merged.

Are you using latest "master" ? Try to update and try again...

Contributor

mercuriev commented Nov 17, 2013

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.

Member

ralphschindler commented Nov 18, 2013

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