[REF] Move isSSLDSN() function to avoid potential problems #18131
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.