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

OCI8 drivers notice on getServerVersion, "matches" is always undefined #4994

Closed
SylvainSimonGPA opened this issue Nov 15, 2021 · 4 comments · Fixed by #4995
Closed

OCI8 drivers notice on getServerVersion, "matches" is always undefined #4994

SylvainSimonGPA opened this issue Nov 15, 2021 · 4 comments · Fixed by #4995
Milestone

Comments

@SylvainSimonGPA
Copy link

Bug Report

Q A
BC Break yes
Version 3.1.3 (I upgraded from 2.13.5)

Summary

The driver fail on "Connection" class for Oracle database. I have a notice everywhere like this.

image

For sure, the matches array is always undefined when the instruction is in assert. I don't know why.
If you move the preg_match instruction outside, its work like a charm.

Current behaviour

All is in the previous capture.

How to reproduce

Juste using this kind of connection, and listen notice error. In symfony is the default.

@derrabus
Copy link
Member

If you move the preg_match instruction outside, its work like a charm.

And that's the solution. Depending on your php.ini settings, instructions inside an assert() might not be executed.

Do you want to provide a PR?

@SylvainSimonGPA
Copy link
Author

Depending on your php.ini settings, instructions inside an assert() might not be executed.

Oh... i don't know what is this configuration, i'v a basic php setup on windows. I'v look the zend.assertions in my configuration, its -1 in production, i imagine its this that your talking.

So this is a real problem in doctrine/dbal ? I have never done PR on open-source projects yet haha I don't know if I would be able to :D

@derrabus
Copy link
Member

I'v look the zend.assertions in my configuration, its -1 in production, i imagine its this that your talking.

Exactly. If you set this to 0 or 1, your problem should be gone. But -1 is the recommended production setting.

see https://www.php.net/manual/en/ini.core.php#ini.zend.assertions

So this is a real problem in doctrine/dbal ? I have never done PR on open-source projects yet haha I don't know if I would be able to :D

No worries. Can you have a look at #4995? Is that what you did to fix the issue?

@derrabus derrabus added this to the 3.1.4 milestone Nov 15, 2021
@morozov morozov linked a pull request Nov 15, 2021 that will close this issue
@morozov morozov closed this as completed Nov 15, 2021
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

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

Successfully merging a pull request may close this issue.

3 participants