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

Fix getServerVersion for OCI8 when assertions are disabled #4995

Merged
merged 1 commit into from
Nov 15, 2021

Conversation

derrabus
Copy link
Member

Q A
Type bug
BC Break no
Fixed issues #4994

@morozov morozov merged commit 821b4f0 into doctrine:3.1.x Nov 15, 2021
@derrabus derrabus deleted the bugfix/oci8-server-version branch November 15, 2021 16:44
@morozov morozov linked an issue Nov 15, 2021 that may be closed by this pull request
@@ -78,7 +78,8 @@ public function getServerVersion()
throw Error::new($this->dbh);
}

assert(preg_match('/\s+(\d+\.\d+\.\d+\.\d+\.\d+)\s+/', $version, $matches) === 1);
$result = preg_match('/\s+(\d+\.\d+\.\d+\.\d+\.\d+)\s+/', $version, $matches);
assert($result === 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference: vimeo/psalm#4392.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OCI8 drivers notice on getServerVersion, "matches" is always undefined
2 participants