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

[REF] Move isSSLDSN() function to avoid potential problems #18131

Merged
merged 1 commit into from
Aug 12, 2020

Conversation

demeritcowboy
Copy link
Contributor

Overview

This recently added function was put in CRM_Core_DAO just because of physical proximity to where it was being used. But this is less than 6 ft apart in violation of physical distancing precautions.

Before

Danger! Danger!

After

Normal civi levels of danger.

Technical Details

Even though all it does is parse a string, calling CRM_Core_DAO::anything triggers the constructor which triggers a database connection, which might not be what you want if you're still at the point of parsing the DSN string.

Function currently only used one place, inside CRM_Core_DAO. Straight up move to CRM_Utils_System which seems safe.

Comments

Added test.

@civibot
Copy link

civibot bot commented Aug 12, 2020

(Standard links)

@civibot civibot bot added the master label Aug 12, 2020
@seamuslee001
Copy link
Contributor

@demeritcowboy is there a reason why your moving it to CRM_Utils_System rather than CRM_Utils_Sql?

@demeritcowboy
Copy link
Contributor Author

Nope no reason, just overlooked it. Thanks.

@seamuslee001
Copy link
Contributor

This looks fine to me now

@seamuslee001 seamuslee001 merged commit 5ad740c into civicrm:master Aug 12, 2020
@demeritcowboy demeritcowboy deleted the move-isssldsn branch August 12, 2020 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants