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 usage of PDO::PGSQL_ATTR_DISABLE_PREPARES for edge case pdo_pgsql setups #2273

Merged
merged 1 commit into from
Jan 5, 2016

Conversation

deeky666
Copy link
Member

@deeky666 deeky666 commented Jan 5, 2016

The constant PDO::PGSQL_ATTR_DISABLE_PREPARES is available since PHP 5.6.0, however this is only true if the extension is installed/built from the PHP core sources. Looks like in rare situations it is possible to run PHP 5.6 with a heavily outdated pdo_pgsql extension (coming from PECL?!?). In this case DBAL crashes.
This PR makes the check for the constant's availability more robust to also work in those setups.

fixes #2249

@deeky666 deeky666 added this to the 2.5.4 milestone Jan 5, 2016
Ocramius added a commit that referenced this pull request Jan 5, 2016
Fix usage of PDO::PGSQL_ATTR_DISABLE_PREPARES for edge case pdo_pgsql setups
@Ocramius Ocramius merged commit 0870e76 into doctrine:master Jan 5, 2016
Ocramius added a commit that referenced this pull request Jan 5, 2016
@Ocramius
Copy link
Member

Ocramius commented Jan 5, 2016

Backported into 2.5 via 2bb8c06

@deeky666 deeky666 deleted the DBAL-2249 branch January 5, 2016 22:35
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compatibility mis-match? PGSQL_ATTR_DISABLE_PREPARES in v2.5.2 (in a PHP 5.6.16 envt)
2 participants