Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A connection string may contain just a single key #8748

Closed
wants to merge 1 commit into from

Conversation

NattyNarwhal
Copy link
Member

PHP used ";" as the heuristic to detect if a string was a connection string versus plain DSN. However, a single-key connection string would get treated like a DSN name, i.e. "DSN=*LOCAL". This makes it so that "=" is used, as a connection string must contain a key.

PHP used ";" as the heuristic to detect if a string was a connection
string versus plain DSN. However, a single-key connection string
would get treated like a DSN name, i.e. "DSN=*LOCAL". This makes it
so that "=" is used, as a connection string must contain a key.
@cmb69
Copy link
Member

cmb69 commented Jun 10, 2022

Ah, good catch! This fix would even allow FILEDSN=whatever.dsn without any workarounds. I don't see a BC problem with this change, since = is not allowed in a DSN name to my knowledge, so this could target PHP 8.0. What do you think, @NattyNarwhal?

@NattyNarwhal
Copy link
Member Author

I agree, I don't think there should be any impact.

@cmb69 cmb69 closed this in 445d950 Jun 13, 2022
@cmb69
Copy link
Member

cmb69 commented Jun 13, 2022

Applied to PHP-8.0+. Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants