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 unreachable code #24411

Merged
merged 1 commit into from
Aug 30, 2022

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Remove unreachable code

Before

Code line is in theory reached if params['pledge_id'] isset - but empty - however - it doesn't get to this line if it is (well arguably 0 - but that would be some dark magic that is entirely accidental)

https://github.com/greenpeace-cee/civicrm-core/blob/717cda3dadfc9e2bf1e643cfe086e56a276c335c/CRM/Contribute/Import/Parser/Contribution.php#L335-L340

After

poof

Technical Details

Comments

@civibot
Copy link

civibot bot commented Aug 29, 2022

(Standard links)

@civibot civibot bot added the master label Aug 29, 2022
@@ -577,21 +577,6 @@ private function deprecatedFormatParams($params, &$values, $create = FALSE): voi
}
$values['pledge_id'] = $params['pledge_id'];
}
else {
// check if there are any pledge related to this contact, with payments pending or in progress
require_once 'CRM/Pledge/BAO/Pledge.php';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, require_once, that's vintage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol yep

@eileenmcnaughton
Copy link
Contributor Author

unrelated fail

@eileenmcnaughton eileenmcnaughton merged commit a5834c8 into civicrm:master Aug 30, 2022
@eileenmcnaughton eileenmcnaughton deleted the import_pledge branch August 30, 2022 01:01
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.

2 participants