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

Remove method getWordReplacement. #22577

Merged

Conversation

braders
Copy link
Contributor

@braders braders commented Jan 19, 2022

Overview

Remove method getWordReplacement.

It appears to have never been used since its introduction 8 years ago,
and furthermore calls functions which don't exist.

Therefore, it would be unlikely to work even if it were used.

Before

Function CRM_Core_BAO_WordReplacement::getWordReplacement() exists. I highly expect it does not work, and would not work even if sometried to use it. Specifically, the method CRM_Core_Config::wordReplacementID(), which the removed method calls, does not appear to exist.

After

Method removed.

Technical Details

The method was introduced here: d83a399

A search with git log -S "getWordReplacement(" shows no other references to this method since.

Comments

There may be an argument for deprecating, but the unlikelyhood of this method actually working makes me think its probably safe to just remove.

It appears to have never been used since its introduction 8 years ago,
and furthermore calls functions which don't exist.

Therefore, it would be unlikely to work even if it were used.
@civibot
Copy link

civibot bot commented Jan 19, 2022

(Standard links)

@civibot civibot bot added the master label Jan 19, 2022
@colemanw
Copy link
Member

Yep, that's why classes should not be written by copy/pasting another class and then search/replacing the name of the entity. Makes a bunch of garbage if you're not careful.

@seamuslee001 seamuslee001 merged commit 7618ff5 into civicrm:master Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants