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

dev/core#2758 - Fix contribution activity campaign propagation ...more #21171

Merged
merged 1 commit into from
Aug 18, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Fixes master-only regression #21167

Before

Can't create a membership with no campaign on back office membership form

After

Can

Technical Details

In this scenarion $contribution->campaign_id is 'null' when it reaches this line & hence it fails

Comments

@pfigel

@kcristiano fyi since you are likely to hit this if you pull from master with #21167 merged

Fixes a scenario where the value can be 'null' and then fatals

I hit this creating a new membership record on a stock build
@civibot
Copy link

civibot bot commented Aug 17, 2021

(Standard links)

Copy link
Contributor

@pfigel pfigel left a comment

Choose a reason for hiding this comment

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

r-run confirms membership creation works now and the original issue is still fixed. LGTM, thanks for catching that!

@seamuslee001 seamuslee001 merged commit f7ec1ba into civicrm:master Aug 18, 2021
@seamuslee001 seamuslee001 deleted the con branch August 18, 2021 10:07
@eileenmcnaughton
Copy link
Contributor Author

thanks @pfigel @seamuslee001 - I guess those 'null's might catch us a few more times with using v4 api

@colemanw
Copy link
Member

Right. APIv4 on the outside does the right thing and treats actual NULL as null and treats the string "null" as a string.
Internally it converts null to the string "null" for the benefit of our idiot database object.

@eileenmcnaughton
Copy link
Contributor Author

lol

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.

4 participants